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.

Lock Text Field(s) after Checkbox has been checked on

Avatar

Level 2

Good Morning Everyone,

I'm looking to see if anyone can help me with an issue I am having.

I am trying to lock down two text fields after a specific checkbox has been turn on/checked.

Can any assist me?

Thank you!

3 Replies

Avatar

Former Community Member

Hi.

Assuming that text fields are named text.0 and text.1 (the dot really matters, you can add more text.n fields if you want).

Place this script in the checkbox as a mouse up event:

if (event.target.value != "Off") {

this.getField("text").readonly = true;

} else {

this.getField("text").readonly = false;

}

Avatar

Level 10

Hi there,

I suggest you to have the code on the change event of the check box.

Also, the readonly property is not the right property if you are using dynamic forms.

Use this snippet code instead.

Hope this will help!

Avatar

Former Community Member

Oops, sorry.

I came to this topic from another forum page and I didn't notice that it's in the LiveCycle Designer section.

So my answer is about Acrobat Pro.