Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Passing attributes to select options
  • Is there any way that I can pass attributes for the options of a select input field? I've been trying to figure this out without much luck so far, and I'm afraid the simple answer is 'No'... I know it's not a very common thing, but it can be useful at times.
  • HarroHarro
    Accepted Answer

    The only attributes supported are "value" (obviously) and "selected" (through the "selected" key of the attribute array that can be passed to select(). It also hardcodes a "style" in case indentation is needed when using optgroup's.
  • Thank you Harro, precise and useful as usual. I might open an issue to request as a possible future development, but at least I know what I can work with in the mean while.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion