Jump to content

Select box


kmk

Recommended Posts

Posted

Hi all, I am learning to use Pages building something like Bug Tracker of ips, now I try to use Select Box custom field, but I dont know how to use or put name on the key name, please anyone can guide me to understand it? 

ipshelp14.PNG

Posted

A select field's html....

 <select>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select> 

'Key' = what is selected and saved (i.e. the 'value' element of the options).

'Value' = what is displayed in the select (i.e. Volvo....Saab....Mercedes

 

Posted

The key can really be anything you want. It won't be displayed (unless you modify the template), but will be what is stored in the database. For that reason, I usually use keys that are fairly close to what is displayed (if not identical) so when I browse the database directly I can easily identify the values, but this probably isn't too relevant to you. In short, you can put whatever you want as the key, unless you plan to do something specific with that value.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...