[html]I have a dropdown named industry and it hasoptions as belowindustryI am using the perl code like this (I have container named document)I am getting the value like 1, 2 ...how can I get the label name?I am using the code as below to get the industry value..[/html]
I have a dropdown named industry and it hasoptions as belowI am using the perl code like this (I have container named document)I am getting the value like 1, 2 ...how can I get the label name?I am using the code as below to get the industry value..
which version of teamsite are you using??
But, if you are looking to do all the work in the tpl, then you could also use iw_case or iw_if in your tpl and replace the values with the labels during the generation. Just another way of doing it. Or you could stick some perl in the tpl that cross references against a array, a database, an external xml file, or something that contains the values and labels names. Limitless options
Do you want to extract the label via FormAPI or after the DCR is created? If FormAPI, you can obtain it with:var label = item.getOptions()[item.getValue()].text;If you want to get the label after the DCR is saved, I suggest you create a hidden form field -- say "industry_label" -- which changes whenever the value of the industry select field is changed. This way, you should have a current text version of the industry dd list.Dave