Expand my Community achievements bar.

How to make required radio button not required if particular checkbox is checked ?

Avatar

Former Community Member

I am only very new to using LiveCycle Designer 9.0 & need help (maybe writing a script?) to make a required radio button not required if a particular checkbox is checked.

For some info on what I am doing ...... I have created a 'Client Contact Form' which I plan to send to all contacts within our database to check their contact details & to confirm if they would like to remain on our mailing list.

Within this form I have a required radio button that clients must check to state that they have read our privacy statement & agree to our us retaining their personal details.  If this radio button is not checked then they can not email the form back as it is a required field.  This I have working OK.

But....  there is also a checkbox on the form that asks the client if they would like to be removed from our mailing list.  If this checkbox is ticked then they do not have to agree to the privacy statement but currently the form will not allow that client to email it as the privacy statement is set as a required field.

Is there any way I can ask it to recognise if the please remove checkbox has been checked & if so make the privacy statment a non required field for this only ?

I have no knowledge of writing scripts at all but am able to view the XML source in Designer.

Any help anyone is able to provide would be wonderfully appreciated.  Cheers

1 Reply

Avatar

Former Community Member

Hi,

I suggest the following:

1) Change the property of privacy statement field as "User Entered - Optional" instead of "User Entered - Required".

2) Now add a validation script that satisfies the following psedudcode on the preSubmit event of the button while submission.

if(value of checkbox  == "Y")

{

   if(value of radiobutton == "Y")

   {

          submit;

   }

  else

{

         throw error;

         cancel submission;

  }  

}

else

{

     value of radiobutton == "N";

     submit;

}

If you further need any help in the form of coding, pls mail your form to kvdvijaykumar@gmail.com

Thanks,

VJ