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

Field Description

Community Beginner ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

Hi there, I was wondering if there is a way to enter a description into the boxes, that one needs to fill out later in a Form. With the same use as Quickinfo, but as Text in the field itsself. But if one clicks on it, the description disappears and one can just fill out the box. You could also call it example-Text... Any ideas? Thank you 🙂

TOPICS
How to , PDF forms

Views

1.4K

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

correct answers 8 Correct answers

Community Expert , Sep 21, 2020 Sep 21, 2020

You can use this code as "Custom Format Script"

if (!event.value) {
event.value = "text goes here";
event.target.display = display.noPrint;
} else {
event.target.display = display.visible;
}

It also won't print instruction text if you need to print file.

Votes

Translate

Translate
Community Expert , Sep 21, 2020 Sep 21, 2020

Without using a script the only option is the Tooltip text under the field's Properties. It will appear when you hover over the field with the mouse.

Votes

Translate

Translate
Community Expert , Sep 21, 2020 Sep 21, 2020

Votes

Translate

Translate
Community Expert , Sep 21, 2020 Sep 21, 2020

Select prepare form tool:

1.png

Then right click on your text field and select 'Format' tab:

Then click on the field where says 'None' and select 'Custom'

2.png

Click on 'Edit' and paste my code in there.

3.png

Votes

Translate

Translate
Community Expert , Sep 21, 2020 Sep 21, 2020

If you used that code it should disappear when you click in field.

Votes

Translate

Translate
LEGEND , Sep 21, 2020 Sep 21, 2020

For the first script, did you place it as a custom Format script, or something else?

Votes

Translate

Translate
Community Expert , Sep 21, 2020 Sep 21, 2020

If you use the code I provided in that thread the text will disappear when you click into the field.

Votes

Translate

Translate
Community Expert , Jan 28, 2022 Jan 28, 2022

In field properties under options tab check "Allow rich text formatting" and use this:

var spans = new Array();
spans[0] = new Object();
spans[0].text = "Did you validate work?"+"\n"+"Do you have supporting documents?"+"\n"+"Have you consulted others?";
spans[0].fontStyle = "italic";
spans[0].textColor = ["G",.8];
if (!event.value) {
event.richValue = spans;
event.target.display = display.noPrint;}
else
event.target.display = display.visible;

 

I added so text is also light gray, if you don't want that,

...

Votes

Translate

Translate
Community Expert ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

You can use this code as "Custom Format Script"

if (!event.value) {
event.value = "text goes here";
event.target.display = display.noPrint;
} else {
event.target.display = display.visible;
}

It also won't print instruction text if you need to print file.

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

Hi Nesa

Thank you for your reply! Unfortunately i don't know how to use codes in Adobe.. and in general 🙂 Is there a way to do it without codes or can you tell me how to do it this way?

 

Thank you and kind Regards

Laura

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

Without using a script the only option is the Tooltip text under the field's Properties. It will appear when you hover over the field with the mouse.

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

Select prepare form tool:

1.png

Then right click on your text field and select 'Format' tab:

Then click on the field where says 'None' and select 'Custom'

2.png

Click on 'Edit' and paste my code in there.

3.png

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

Hi Nesa

 

Nevermind, i figured it out 😄 Now one further question: is there also a possibility to make the text disappear as soon as you click in the field and fill it out?

 

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

If you used that code it should disappear when you click in field.

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
New Here ,
Jan 27, 2022 Jan 27, 2022

Copy link to clipboard

Copied

Nesa, is there a way to break multiple lines if instructions inside of the "text goes here" portion?
I want the end result to simulate a sequence of steps.

  1. Did you validate work?
  2. Do you have supporting documents?
  3. Have you consulted others?

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 ,
Jan 27, 2022 Jan 27, 2022

Copy link to clipboard

Copied

You want to show all 3 questions at the same time , with each question be on different lines?

Set field to multiline and use this:

if (!event.value) {
event.value = "Did you validate work?"+"\n"+"Do you have supporting documents?"+"\n"+"Have you consulted others?";
event.target.display = display.noPrint;}
else
event.target.display = display.visible;

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
New Here ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Thank you, that worked perfectly.
One last question.
How can I italicize those same three questions?

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 ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

In field properties under options tab check "Allow rich text formatting" and use this:

var spans = new Array();
spans[0] = new Object();
spans[0].text = "Did you validate work?"+"\n"+"Do you have supporting documents?"+"\n"+"Have you consulted others?";
spans[0].fontStyle = "italic";
spans[0].textColor = ["G",.8];
if (!event.value) {
event.richValue = spans;
event.target.display = display.noPrint;}
else
event.target.display = display.visible;

 

I added so text is also light gray, if you don't want that, remove this line from script:

spans[0].textColor = ["G",.8];

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
New Here ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

LATEST

EXCELLENT, Worked Perfectly.  Thank you again.

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

Hi there, thanks a lot for all the replies! I figured out how to insert the code, but with both versions, the one from Nesa and the one from the website "try67" the text does not disappear, when i click in the field. One has to delete it first manually... any suggestions?

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
LEGEND ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

For the first script, did you place it as a custom Format script, or something else?

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

If you use the code I provided in that thread the text will disappear when you click into the field.

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

Ok thank you so much for all the help, figured it out now 🙂

 

2 further questions though:

1. is there a way to have the description-text in a different shape or colour than the one that is typed in in the end?

2. In case the text i need to fill in the boxes is too much for the given space, is there a way that the text then just gets smaller so it fits in the box in the end? Because now it just starts scrolling and then if you would want to print it, you wouldn't see the whole information...

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 ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

You can use different aproach if you want to change text color and size.

Go to field properties -> action tab and add javascript for both onFocus and onBlur actions:

Just make sure where it says "Text goes here" when you change that text change it in both codes and make sure it's same in both codes.

Or if you know how to add default value to text field replace "Text goes here" with:

event.target.defaultValue 

On Focus:
if(event.target.value == "Text goes here"){
event.target.value = "";
event.target.textColor = ["G",0];
event.target.textSize = 15;}

On Blur:
if(event.target.value==""){
event.target.value = "Text goes here";
event.target.textColor = ["G",.5];
event.target.textSize = 10;}

 

You can change colors and text size as you see fit.

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