• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

button to make an already automatically filled field go blank so that user can type in new info

Community Beginner ,
Nov 04, 2020 Nov 04, 2020

Copy link to clipboard

Copied

I have a multi-page form that uses the same information to fill in numerous blanks, specifically the user’s name. I have named all such fields  the same (“Name”) so that when the user fills in the first field all the others are also filled in.

 

However, there is one such blank where the user might want to occasionally leave the field blank or type in different information.

 

I am new to this, but I hae created a button the user can hit and make the one selected field go blank, allowing the user to then either leave it blank or type in  new information.

 

To do this I have cobbled together the following code:

 

  1. I changed name of  the field to be made changeable from “Name” to ““Name1”

 

  1. I created a field named “Hidden” that has a display of “Hidden”

 

  1. I put the following JavaScript in the calculate tab of “Name1”

 

if (this.getField

("Hidden").value.length== 0)

event.value = this.getField("Name").valueAsString

 

4          In the actions tab of the button I put the following two scripts

 

a)

 

this.getField

("Hidden").value

=

"Hidden"

 

b)

 

this.resetForm("Name1")

 

Surely to goodness there is a simpler, more straight forward way to do this. What is it? It's bothering me.

 

Thank you very much in advance for your assistance.

TOPICS
How to

Views

265

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2020 Nov 04, 2020

Copy link to clipboard

Copied

Post the question in the forum for Adobe Acrobat.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 04, 2020 Nov 04, 2020

Copy link to clipboard

Copied

Thanks. I have coppied the text of this post into a new post in the acrobate forum and am just about to hit Post. Is there a way to move this post?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2020 Nov 04, 2020

Copy link to clipboard

Copied

LATEST

You can't move the post.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources