Created
September 8, 2021 00:50
-
-
Save estefanionsantos/e156f4fb17316e8da4e514dbd1ed8193 to your computer and use it in GitHub Desktop.
option 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\SelectOptForm; | |
$opt[] = 'choose'; | |
$opt[] = 'lorem'; | |
$opt[] = 'ipsum'; | |
$opt[] = 'dolor'; | |
$select = new SelectOptForm('latim', $opt); | |
/* | |
// OR 3 arguments 'selected' | |
$select = new SelectOptForm('latim', $opt, 2); | |
*/ | |
$select->setAttribute('class', 'sel_lorem'); | |
echo $select->getElement(); | |
/* | |
<select name="latim" class="selectpicker"> | |
<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