Jump to content
UBot Underground

mapping text to values in ui dropdown


Recommended Posts

I want to display a list of categories a user can choose like:

 

appliances

all categories

mobile phones

clothing

etc...

 

but the values i need assigned to the variable are different than the what I want displayed in the ui dropdown

 

so the values would be

 

appliances

aps

mobile-phones

clothes

 

how do i display the full category name to the user and still assign the correct value to the variable name to be used later?

Link to post
Share on other sites

Hi,

 

Sample code:

if($comparison(#uivalue, "=", "appliances")) {
then {
 set(#runcategory, "appliances", "Global")
}
else if($comparison(#uivalue, "=", "all categories")) {
 then {
	 set(#runcategory, "aps", "Global")
 }
}
else if($comparison(#uivalue, "=", "mobile phones")) {
 then {
	 set(#runcategory, "mobile-phones", "Global")
 }
}
else {
}
}

 

Kevin

Link to post
Share on other sites

When you created your drop down... wouldn't you just do....

 

<select name="#uichoice" fillwith="value">
<option value="appliances">appliances</option>
<option value="aps">all categories</option>
<option value="mobile-phones">mobile phones</option>
</select>

  • Like 1
Link to post
Share on other sites
  • 7 months later...

 

When you created your drop down... wouldn't you just do....

 

<select name="#uichoice" fillwith="value">
<option value="appliances">appliances</option>
<option value="aps">all categories</option>
<option value="mobile-phones">mobile phones</option>
</select>

 

That certainly seems to make a lot more sense. Is the Dev license required in order to do that?

Link to post
Share on other sites
  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...