eZ Community » Forums » Setup & design » Best way to have options pre selected?
expandshrink

Best way to have options pre selected?

Best way to have options pre selected?

Saturday 03 May 2003 4:41:08 pm

I was wondering how one goes best about adding the selected attribute to individual <option> elements based on the content of a variable.

switch seems not to work, as it will strip away everything outside the {case} {/case} elements and having an entirely different option box for each case of the switch is rather ugly and hard to change when you decide to change some option.

Ideally, I'd want something like
<option {if $myvalue=a>a</option>
<option {if $myvalue=b>b</option>

The eq operator seems of no use either as it will return true, not some arbitrary element of text...

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from