It looks like that it is not possible to disable single options in a select tag
with html_options.
The disabled option only disables the whole select input for me, so i slightly
changed the code.
This handles the disable attribute just like the selected attribute.
PHP-Code
$options = array(
0 => "option0",
1 => "option1",
2 => "option2"
);
$smarty->assign("options",$options);
$smarty->assign("disabled", array(1,2));
Smarty-Template
<select>
{html_options options=$options disabled=$disabled strict=1}
</select>
HTML-Output
<select>
<option value="0">option0</option>
<option value="1" disabled>option1</option>
<option value="2" disabled>option2</option>
</select>
My changes are in the disabled, readonly case of the switch-statement
Original issue reported on code.google.com by peterkre...@gmx.at on 26 Aug 2014 at 10:39
Original issue reported on code.google.com by
peterkre...@gmx.at
on 26 Aug 2014 at 10:39Attachments: