Hi,
I have an adaptive form with a select dropdown. I have a JS written which selects an option from the dropdown based on query parameter. E.g (?car=audi will select AUDI from dropdown). The JS is working as expected. On page load it selects the correct option.
ISSUE : When I try to submit the form I get a validation error saying 'Please select an item from the dropdown'. Somehow the form is not able to fetch the val for the select. I have printed the val in console and it is coming as expected. I have tried by added .change() to trigger a change in JS. But the same issue persists.
Can someone please share some insights on what might be going wrong?
Solved! Go to Solution.
Views
Replies
Total Likes
Can you try setting the dropdown value in the Initialize event, as below and check:
this.value=<string value>;
Views
Replies
Total Likes
Can you share the JS you are using to set the dropdown value?
I tried this at my side on 6.5.10. And I am able to submit the value of the dropdown.
This is my form with dropdown:
This is the script I am using to set the dropdown value on initialize:
This is the output I am getting on submitting the form:
Views
Replies
Total Likes
Views
Replies
Total Likes
Can you try setting the dropdown value in the Initialize event, as below and check:
this.value=<string value>;
Views
Replies
Total Likes