Go Back   Tech Support Forum > Design Forum > Design Discussion & FAQs

User Tag List

Adobe Designer 7.0

This is a discussion on Adobe Designer 7.0 within the Design Discussion & FAQs forums, part of the Tech Support Forum category. Is it possible to have a drop-down list showing two columns of data and only posting the value? Example: Field


Closed Thread
 
Thread Tools Search this Thread
Old 01-26-2010, 07:18 AM   #1
Guest
 
Join Date: Jan 2010
Posts: 2
OS:



Is it possible to have a drop-down list showing two columns of data and only posting the value?

Example:
Field Name: Sex
Field Options: M Male
F Female

Obviously this example is simplistic.. I want to show to full description but when user selects "Male".. I want to display the value "M"..

Thanks for your time in advance..

... Sherri
sheyde is offline  
Sponsored Links
Advertisement
 
Old 02-24-2010, 11:24 AM   #2
Guest
 
Join Date: Jan 2010
Posts: 2
OS:



Solution...

This is to all who have been trying to find an answer .. I'm using Adobe LiveCycle Designer 7.0.. I updated Adobe Reader to 9.1.3

This allows you to see the lookup field text for a field and place the value instead of text.. If user selected the wrong option.. User can go back and select another choice.



Thank you "chandra sekhara varma nimmagadda" for your assistance and patience!My apologies for not closing this sooner.


... Sherri




.............................................





Create a hidden text field called "TryDDBackup"

Create a DropDown list field called "TryDD"

Make sure that you specify item menus is checked and you have your Value and Text listed in the table..

In my situation I had:

L Long

M Medium

S Short



Add the following code:

----- form1.#subform[0].TryDD::initialize - (JavaScript, client) -----------------------------------

var ddList = ""; //variable to hold the list for this instance
//xfa.host.messageBox(""+this.length)//to display totoal number of listed options in this dropdown
var numberOptions = this.length; //to hold the value of number of items in the options list
TryDDBackUp.rawValue = "" //set the related hidden textbox value to null
for (i=0;i<this.length;i++) {
//xfa.host.messageBox(""+this.getDisplayItem(i));
ddList = ddList + "***" + this.getDisplayItem(i) + "~" + this.boundItem(this.getDisplayItem(i));
//construscting value with display text and it's value to use later
}
TryDDBackUp.rawValue = ddList; //now save the constructed value to related invisible textbox for future use.

this.clearItems(); //will clear options list but we do not have to worry as we saved all the values
//in the related invisible textbox. We will load them in "preOpen" event





----- form1.#subform[0].TryDD::exit - (JavaScript, client) -----------------------------------------

var selectedVal = this.rawValue; //currently selected value
this.clearItems(); //again clear list for this DD
this.addItem(selectedVal); //add new list item with the selected value for this DD
this.rawValue = selectedVal; //now force it to select the value again.





----- form1.#subform[0].TryDD::preOpen - (JavaScript, client) --------------------------------------

var preSelecteVal = this.rawValue; //save the value incase it is being selected already
this.clearItems(); //clear all the options
var stringList = TryDDBackUp.rawValue; //get the constructed value from initilize event code
stringList = stringList.split("***"); //split the value to multiple list options

//start loading list options
var listItem; //variable to hold temp values for each itration
for (i=1;i<stringList.length;i++) {
//xfa.host.messageBox(stringList[i])
listItem = stringList[i];
listItem = listItem.split("~"); //prepare the display text and related value to load in to options list
this.addItem(listItem[0], listItem[1])
}

this.rawValue = preSelecteVal; //load previously selected value if any
sheyde is offline  
Old 02-24-2010, 11:26 AM   #3
Moderator Hardware Team
 
koala's Avatar
 
Join Date: Mar 2005
Location: UK
Posts: 26,228
OS: Win7-64, BunsenLabs

My System


Thanks for posting your solution.
__________________

Disable Social Media Buttons: adblockplus.org/en/features#socialmedia
koala is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2
Powered by vBadvanced CMPS v3.2.3


All times are GMT -7. The time now is 09:38 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.1.0 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 2001 - 2018, Tech Support Forum

Windows 10 - Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts