Home » HTML » HTML_Template_Flexy » Bug #1071
Conditional Attributes
Details
| Submitted | 2004-03-25 19:59 UTC |
|---|---|
| From | ahundiak at ingr dot com |
| Status | Suspended |
| Package | HTML_Template_Flexy |
| PHP Version | Irrelevant |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-03-25 19:59 UTC] ahundiak at ingr dot com
Description:
------------
I'd like to be able to control the selected attribute in the option element. Generate:
<option selected="selected">
With a template like this:
<option flexy:eval="{if:1}selected=#selected#{end:}">
The if:1 would of course be a test to see if you wanted the option to be selected. I think there would be other cases where it would be nice to conditionally add attributes to an element.
I know you can do this with the form element processing stuff. But I would like to avoid that for now.
[2004-03-29 19:59 UTC] ahundiak at ingr dot com
Thanks.
Raw is a start but a conditional would still be nice.
<option flexy:raw="{option.isSelected()}"
requires that the isSelected method return html code. I'd rather keep the html code in the template. Similiar issue with checked="checked".
Just consider this a feature request for a rainy day.