function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
test269test269 

passing input text value to picklist

Hi All,

     i hava two fileds in my visualforce page.One is picklist and another one is text field.

 

Countrycode------------->picklist(ex:options.put('001','US')

Countrycode-------------->text filed.

 

Whenever i enter the Value as US in text filed then it will be stored as 001(not us).How is this possible.Any one can you please help me this.

 

 

Thanks in advance

 

Navatar_DbSupNavatar_DbSup

Hi,

 

You can create a map in which the key will Picklist values like us and map value is your code.When you are saving the value fetch the code from the on the basis of the textbox input.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

test269test269

Thank you for your replay.

      it is ok.But in this text field we entered different values.Pick list will contain nearly 40 countries.How its possible.Can u please give me the sample code.

 

Thanks