I want to exclude dropdownlist from post if it is disabled/readonly

Hi,

I have 2 dropdownlists where the associated model fields are required. One is disabled and readonly while 2nd is enabled.

However when I click on the submit both drop down lists are showing the required validation error and submit is aborted.

How do I prevent required validation when control is disabled.

Other html controls like input etc, work as expected. If I replace the above 2 dropdownlists with input type=text, the disabled one is ignored by the validation. Only the enabled one displays the required validation and successfully submits if I enter data in the enabled textbox.


Thanks
Avinash Tauro


1 Reply

KP Kokila Poovendran Syncfusion Team November 15, 2023 01:13 PM UTC

Hi Avinash,


We appreciate you reaching out to us about the issue you're encountering with the dropdownlists. We understand the inconvenience this has caused, and we are here to assist you.


To better assist you, could you please provide more details about the issue? Specifically, let us know if you are using "ejs-for" to validate the input field or if you are relying on the "required" attribute for validation.


Sharing the entire code snippet would greatly help us in diagnosing the problem accurately. This will enable us to identify the root cause and provide you with a more effective solution. Your cooperation in providing these details is highly appreciated.


Thank you for your understanding, and we look forward to resolving this issue promptly.


Regards,

Kokila Poovendran.


Loader.
Up arrow icon