PHP code example of openlss / lib-form

1. Go to this page and download the library: Download openlss/lib-form 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/ */

    

openlss / lib-form example snippets


use \LSS\Form\Checkbox;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring checkbox form
echo Checkbox::_get()->setOptions($arr)->setName('test')->setValue(1);

echo $form_obj;
$checkboxes = (string)$form_obj;

use \LSS\Form\Drop;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring radio form
echo Drop::_get()->setOptions($arr)->setName('test')->setValue(1);

echo $form_obj;
$drop = (string)$form_obj;

use \LSS\Form\Radio;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring radio form
echo Radio::_get()->setOptions($arr)->setName('test')->setValue(1);

echo $form_obj;
$radio = (string)$form_obj;