Select Dropdown Val not being submitted on Form Submission | Community
Skip to main content
ksh_ingole7
New Participant
November 11, 2021
Solved

Select Dropdown Val not being submitted on Form Submission

  • November 11, 2021
  • 2 replies
  • 797 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mayank_Tiwari

Can you try setting the dropdown value in the Initialize event, as below and check:

 

this.value=<string value>;

2 replies

ksh_ingole7
New Participant
November 11, 2021
Mayank_Tiwari
Mayank_TiwariAccepted solution
Employee
November 11, 2021

Can you try setting the dropdown value in the Initialize event, as below and check:

 

this.value=<string value>;
Mayank_Tiwari
Employee
November 11, 2021

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: