cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in clearing the data in free text filed while selecting the Radio button in Offline Adobe forms

Former Member
0 Kudos

Hi All,

Actually I am working on the offline Adobe forms. In one of my requirement I have two radio buttons like YES and NO, Under these radio buttons I have one free text field.Here if user can select YES button then only below text field is open(it is enabled) otherwise if user can NO radio button the below same text field will be in Read-only mode(can't edit).

So, I written java script it is working fine but I have one issue. First user can select the YES radio button and he will enter some text in the field after that if user can select the NO radio button the already entered data will cleared using java script.


Please help me how to archive the above functionality.


Your help will be appreciated.



Thanks,

Ravi.


Accepted Solutions (0)

Answers (1)

Answers (1)

SandySingh
Active Contributor
0 Kudos

Can you share the script code and specify the event where you have placed this script.

on the change event


if(this.rawValue = "true") {

textField1.presence == "visible";

} else {

textField1.presence == "hidden";

}

also check which radio button is selected in click event and then hide or make text box display only.

regards

sandy


Former Member
0 Kudos

Hi Sandy,

Thanks for your reply.

I want to just enable and disable the field only not hidden and visible. If user select the NO radio button the entered data in the text field must be cleared.

I written the below java script it enabling while I am  selecting on YES radio button and it is disabled while I am selecting the NO radio button but it is not clearing the text when user select on the NO button.

if(this.rawValue == 1)

{

data.resolveNode("data.Page2.MainSubform.#subform[8].#subform[9].TextField16[1]").access = "open";

}

else

{

data.resolveNode("data.Page2.MainSubform.#subform[8].#subform[9].TextField16[1]").access = "readOnly";

}

SandySingh
Active Contributor
0 Kudos

Hi Ravi,

if(this.rawValue == 1)

{

data.resolveNode("data.Page2.MainSubform.#subform[8].#subform[9].TextField16[1]").access = "open";

}

else

{

data.resolveNode("data.Page2.MainSubform.#subform[8].#subform[9].TextField16[1]").access = "readOnly";

data.resolveNode("data.Page2.MainSubform.#subform[8].#subform[9].TextField16[1]").rawValue  == '''';

}