Hi
I have Dropdown ModeOfPayment. I want if user selects Bank then txtAccountNo,txtAccountName should be enabled else
they should remain false
Cash
Cheque
Bank Transfer
Thanks
Hi
I have Dropdown ModeOfPayment. I want if user selects Bank then txtAccountNo,txtAccountName should be enabled else
they should remain false
Cash
Cheque
Bank Transfer
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question.
Naimish MakwanaPosted Sep 4, 2024, 10:58 AM
To achieve this functionality, you can use JavaScript to enable or disable the textboxes based on the selected value of the dropdown. Here’s an example of how you can do it:
txtAccountNoandtxtAccountNametextboxes to your form.onchangeevent to the dropdown to call a JavaScript function when the selection changes.Here’s the complete code:
This script will enable the
txtAccountNoandtxtAccountNametextboxes only when “Bank Transfer” is selected from the dropdown. Otherwise, the textboxes will remain disabled.Thanks