Making a field mandatory only when visible?

Avatar

Avatar

ellis355

Avatar

ellis355

ellis355

16-06-2016

Hi

I want to make fileds only mandatory when they are visible

I thought this code would work but it doesnt seem to do anything?

Here is my code currently - any ideas guys?

if (form1.Page1.DropDownList1.presence == "visible") {

form1.Page1.DropDownList1.mandatory = "error";

}

if (form1.Page1.DropDownList1.presence == "hidden") {

form1.Page1.DropDownList1.mandatory = "disabled";

}

Thanks in annnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnticipation!

Ellis

View Entire Topic

Avatar

Avatar

Karwan_Mawlood

Avatar

Karwan_Mawlood

Karwan_Mawlood

19-06-2016

You code looks fine, please share your form to see what's the issue and we can help you .