Hi,
According to your description, my understanding is that you want to set the other field required if the dropdown list value is 2.
I suggest you can use Jquery Validate Plugin to achieve it. You can place the Jquery code under the PlaceHolderMain tag in the New/Edit form page.
Here is a code snippet for your reference:
More information:
b: {
required: {
depends: function(element){
return $("#dropdownlist").val()=="2"
}
}
}
c: {
required: {
depends: function(element){
return $("#dropdownlist").val()=="2"
}
}
}
d: {
required: {
depends: function(element){
return $("#dropdownlist").val()=="2"
}
}
}
e: {
required: {
depends: function(element){
return $("#dropdownlist").val()=="2"
}
}
}
More information:
jquery validate plugin require field if another field has a value and vice versa
Thanks
Best Regards,
Jerry Guo
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
No comments:
Post a Comment