Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Clearing text field on click?

Avatar

Former Community Member

Pardon my very n00bish question...I've only dabbled with LC a bit for the last couple years.

Working on a fillable form - and I'm wondering if there's a way to clear out the default value of a text field when the user clicks in it?

I've tried Googling about and searching these forums, but haven't found a good answer. Or at least one that I can understand...

Help, please and thank you!!!

1 Reply

Avatar

Level 10

Hi,

One way around this is to use a null pattern (in the Object > Field tab, click patterns). You can set the null pattern to be whatever string you want. When the user clicks inside the field, tha pattern is cleared and will only be visible if the field is null.

Example here: https://acrobat.com/#d=uqcNdyoPayTa2MbPb8F88A

You could also use script to clear the default value, but this can get tricky if the user inputs the default value.

See if the null patterns works,

Niall