on 12-01-2008 10:32 AM
Hi,
I have a drop down box in my interactive form with WDABAP. Depending on my selection few fields should be mandatory. If I select different value from the dropdown, then other few fileds should be mandatory. How to do this using java script?
Regards,
J.Smitha.
Depending on your selection, you can set other fields as mandatory.
Write the below script in that particular field's 'preSubmit' event. This will check the value of the filed according to the given condition and will make other specified fields as mandatory. If you want to set other fileds as mandatory in case the first filed doesn't have nay value, then use - this.rawvalue == NULL.
if (this.rawValue == X) {you can check all the values from the drop down list using 'OR' condition}
then
otherfield1.mandatory = "error"
else
otherfield1.mandatory = "disabled"
endif
if (this.rawValue == Y) {you can check all the values from the drop down list using 'OR' condition}
then
otherfield2.mandatory = "error"
else
otherfield2.mandatory = "disabled"
endif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.