Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Signature Button Readonly until radio button is checked.

Avatar

Level 1

I need to set a signature field as "readonly" until one of three radio buttons is selected.  I have tried the following script and cannot get it to work.  Any help will be GREATLY appreciated.  I have tried this on the "initialize" and the "click" event of the signature field and I still cannot get it to work.

 

temp.jpg

8 Replies

Avatar

Level 2

Trying using rawValue instead of value.

Avatar

Level 1

ive tried that and it didnt work

Avatar

Level 2

Try it on the radiobuttlist change event.

Avatar

Level 1

Still not working. I have tried modifying the code, which looks to me like it should work:

if(RadioButtonList.Option1.rawValue!="" || RadioButtonList.Option2.rawValue!="" || RadioButtonList.Option3.rawValue!=""){ // If any button is selected (at least one is not null)

SignatureFldEmpl.access="open"; // Make it open

}

else{ // Else if no button is selected

SignatureFldEmpl.access="readOnly"; // Make it readOnly

}

I have added this to the change event to both the RadioButtonList and the Signature field and neither one will work.

Donna Albright

(205) 581-2971

Avatar

Level 2

Looking at the object pallette, it doesn't appear that signature fields have an access property. Try using the presence property. Make it hidden by default then visible when the radio button is selected and vice versa.

Avatar

Level 1

I was able to set the access to “readOnly” though when I was testing, that was the first thing I did and it worked. I will see if the presence property will work. Thanks!

Donna Albright

(205) 581-2971

Avatar

Level 1

Still no luck.  I'm not sure that I am setting this on the proper Event or field.  I have tried several different options but nothing seems to work.  Currently I have set it on the click event of the Signature Field, thinking that when the employee clicks on the field to sign, if the buttons were not selected then the field would disappear.  Any guidance as to what I am doing wrong?  I really need to get this to work.  Any and all help is appreciated!     Am I interpreting the rawValues correctly?  I have also attached a copy of the bindings for the RadioButtonList.

Bindings.jpg

 

PDFScript.jpg