PHP code example of ddtraceweb / pfbc

1. Go to this page and download the library: Download ddtraceweb/pfbc library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ddtraceweb / pfbc example snippets




use PFBC\Form;
use PFBC\Element\Texbox;
use PFBC\Element\Select;
use PFBC\Element\Button;

session_start();

$form = new Form("GettingStarted");

$form->setDefaultUrlsJs(
    array(
        $form->getResourcesPath() . '/bootstrap/js/bootstrap.min.js',
        $form->getResourcesPath() . '/jquery/js/jquery.min.js'
        )
    );

$form->setDefaultUrlsCss(
    array(
        $form->getResourcesPath() . '/bootstrap/ccs/bootstrap.min.css',
        $form->getResourcesPath() . '/bootstrap/css/bootstrap-responsive.min.css'
        )
    );

$form->addElement(new Textbox("My Textbox:", "MyTextbox"));

$form->addElement(new Select("My Select:", "MySelect", array(
   "Option #1",
   "Option #2",
   "Option #3"
)));

$form->addElement(new Button);
$form->render();