Created
September 8, 2021 00:55
-
-
Save estefanionsantos/f3390a60b67a2536e5c6658d329a024a to your computer and use it in GitHub Desktop.
select form rubricate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Rubricate\Form\SelectForm; | |
use Rubricate\Form\OptionForm; | |
$select = new SelectForm('latim'); | |
$select->setAttribute('class', 'sel_lorem'); | |
$opt[] = 'choose'; | |
$opt[] = 'lorem'; | |
$opt[] = 'ipsum'; | |
$opt[] = 'dolor'; | |
/* | |
select option: | |
new OptionForm($opt, 1) ; | |
*/ | |
$select->addChild(new OptionForm($opt)); | |
echo $select->getElement(); | |
/* | |
<select name="latim" class="sel_lorem"> | |
<option value="0">choose</option> | |
<option value="1">lorem</option> | |
<option value="2">ipsum</option> | |
<option value="3">dolor</option> | |
</select> | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment