SourceForge.net Logo
Home | SourceForge | Documentation | FAQ | What's New | To-Do List | Forums | Download | Contact

enum Tag

Attribute List:

This is essentially a "case" statement inside the "switch" of the enumset. For example, the following:

<enumset id="yesno">  
  <enum key="n" value="No" />  
  <enum key="y" value="Yes" />
</enumset>

...will define an enumset called "yesno". That set can be referenced by any sqlfield and allow it to "prettify" its values. If the value of that field happens to be "n", the widget's value  will retain the real value of "n", but its label will be shown as "No". (The label is, for example, the text between OPTION tags, the words next to a radio button, etc.) Textfields and textareas can't make use of these tags.

Attributes are relevant to all templates.

Type of tag: Self-closing

Attributes

key


Required: Yes
Values: The value to check for

If the value of the field retrieved in the data is the "key" attribute, then...

value


Required: Yes
Values: What to replace the label with

...the label will be replaced with the "value" attribute.