Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

Can dropdown field option value be different than what is displayed between option tags?

  • bogies
  • bogies
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
11 years 10 months ago #219329 by bogies
Hi
Is there a way to have the option value be different than what is displayed between the option tags in a dropdown.

Example:
This is the way cb creates the dropdown field, the value and what is between the option tags is the same. There is no option when editing the field to put something different between the option tags.

<select id="cb_dateformat" class="required inputbox" name="cb_dateformat">
<option id="cbf22" selected="selected" value="U.S.">U.S.</option>
<option id="cbf23" value="International">International</option>
</select>

Would like it to be like this:
When the form is viewed the user will see the 2 options in the dropdown U.S. and International but the option value would be 1 and 2 instead of being the same as what is displayed between the option tags.

<option id="cbf22" selected="selected" value="1">U.S.</option>
<option id="cbf23" value="2">International</option>

Please Log in or Create an account to join the conversation.

  • bogies
  • bogies
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
11 years 10 months ago #219472 by bogies
Can anyone comment if there is a way to do this?
Or is it just not possible because of the way the field values work?

Thanks

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum