On 30 Aug 2002, Ian Bicking wrote:
> Really, there should be a way to render the items in a radio field
> individually, instead of having to display the whole set at once. The
> only fields I can think of that need this are RadioField and
> MultiCheckboxField, both of which also don't need to be wrapped in
> anything (unlike a select box that needs <select></select> around the
> options).
>
> I'm not exactly sure what that accessor should look like.
I'd vote for something like:
## the whole HTML
$form.myRadioField.selections.mySelectionName
## empty string / false / None or "checked" or "selected"
$form.myRadioField.selections.mySelectionName.selected
Of course, it would be nicer if "selections" was a shorter word. Maybe
"options" or "items" or somesuch. But you get the idea... I don't think
it's a good idea to just put the named options / selections into the
namespace of the aggregate field itself, since your selection names will
probably clash with some of the defined attributes and methods of the
aggregate field. Like "name", for instance :)
On a related note, it's not obvious how to add arbitrary attributes to the
HTML for a field. For instance, I want to add a CSS "class" attribute to
some of my inputs. Right now, I'm coding the inputs by hand, but I'd
prefer to use FFK and give it a class option. Am I missing anything, or
does that just not exist yet?
Thanks!
- t.
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss