Add default value in Lookup select box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2019 01:30 AM
Hi Team,
In my catalog, we want to always show a "Not in List" option in lookup select box (Var1) as the first option.
Now that Var1 is dependent on Var2(another lookup select box) .The dependency is set through script include and reference qualifier.
I am trying to achieve through onChange client script of Var2 and using g_form.addOption but it is not working.
Any idea?
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2019 01:35 AM
Hi,
Go through below thread, this will helps you.
How to populate Lookup Select Box based on value of another Lookup Select Box?
Respond back, if having further queries.
Mark Correct/Helpful, if this helps you.
Regards,
Devyani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2019 01:40 AM
Hi Devyani,
i have already done that part. My question is how to always show a default option which is doesn't depend on the dependency?
For eg :
if Var 2 = Fruits
Var 1 options = Not in List, apple, banana
if var 2 = animal
Var 1 options = Not in List , lion, cat
"Not in List" should always be visible. How can i achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2019 01:55 AM
Hi,
There is a default value field available in the variable table, using that you can set default value.
You can share your script and respond back, if having more queries.
Mark Correct/Helpful, if this helps you.
Regards,
Devyani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2019 02:41 AM
Default value will set the value .. I need a default value in the options.