Highlighted

radio button script for Livecycle static form

Avatar

Avatar

msbhma

Avatar

msbhma

msbhma

14-09-2014

On my static Livecycle PDF form, I have a radio button group called Entry_type with 2 options. If option 1 is selected, I want another radio group called T_shirt to be not available. If option 2 is selected I want T-shirt to be mandatory. I want to validate these actions before the form can be emailed or saved.

I am a coding novice and have tried various scripts but they are not working. Here is my last attempt:


----- Form.Page1.Entry_type::click: - (JavaScript, client) -----------------------------------------

if (this.rawValue == 2){

  T_shirt.validate.nullTest = "error";

 

if (this.rawValue == 1){

   T_shirt.validate.nullTest = "disabled";

}

----- Form.Page1.Entry_type.Basic::click: - (JavaScript, client) -----------------------------------


Could someone help me with a correct Javascript or Folmcalc script?

Much appreciated.

Regards - Maggie

Replies

Highlighted

Avatar

Avatar

sonya1

Avatar

sonya1

sonya1

16-09-2014

Hi,

Please try the below code

if(this.rawValue == "2")

{

T_shirt.presence = "visible";

T_shirt.mandatory = "error";

}

else

{

T_shirt.presence = "hidden";

}


Regards,

Sony

Highlighted

Avatar

Avatar

msbhma

Avatar

msbhma

msbhma

16-09-2014

Thanks Sonya. I still could not get the script working but I appreciate your suggestion. I think I will try another tack. Regards Maggie