In: |
ValidForm.rb
ValidForm_html.rb |
Parent: | Object |
A specific option present in an ::OptionSet, ::RadioSet, or ::CheckboxSet. Note that Options should not be added directly to a ValidForm. Instead, ::Container#add_fields should be used to add options to an option set, and that set should be added to the form.
chosen | [RW] | A boolean value indicating whether or not this option is chosen. |
optionSet | [RW] | Indicates an ::OptionSet that this option is associated with. (This field is set automatically when ::Container#add_fields is called) |
id: | The unique identifier for this option. [reqd] |
value: | The initial String value for the option. [reqd] |
label: | The human-friendly label for the option. |
attributes: | A Hash of various custom attributes to be associated with the option. |
Passing the Symbol/value pair :chosen=>true in the attributes collection will set the chosen attribute for this option (and will then remove it from the attributes Hash).
See ::OptionSet#new for an example creating an ::Option.
Returns an HTML representation of the field itself. See also ::Field#to_html.