Skip to main content
ksh_ingole7
Community Advisor
Community Advisor
November 11, 2021
해결됨

Select Dropdown Val not being submitted on Form Submission

  • November 11, 2021
  • 3 답변들
  • 838 조회

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?

이 주제는 답변이 닫혔습니다.
최고의 답변: Mayank_Tiwari

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

 

this.value=<string value>;

3 답변

Mayank_Tiwari
Adobe Employee
Adobe 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:

 

ksh_ingole7
Community Advisor
ksh_ingole7Community Advisor작성자
Community Advisor
November 11, 2021
Mayank_Tiwari
Adobe Employee
Adobe Employee
November 11, 2021

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

 

this.value=<string value>;