Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Saving & retrieving <option> name & value from DCR
lcarr
I have a drop down list box in a DCT that reads 2 database columns, a country_name and country_id as name/value pairs. When I build the <select> item in the DCT, option name is set to country_name and option value is set to country_id.
When a new data record is created, the country_id (db record id), not the country_name is stored in the DCR as the item value. This is done in order to easily map the DCR to the database by id. However, in TeamSite WebDesk, when a user views the existing DCR, or previews the DCR in a tpl, we no longer have the country name to display. Is there an approach that can satisfy our requirements which preserves the country_name?
Find more posts tagged with
Comments
Migrateduser
We had the same problem over here. To solve it I created a hidden fields, in your case would be called "country_name" and whenever the user changer the dropdown I update this hidden field. Later when user decides to view the DCR the "country_name" will show up. You have to to all of this using formAPI and JavaScript.
Paulo Gouveia
Royal Caribbean and Celebrity Cruises
Information Tecnology