Copy link to clipboard
Copied
I am creating a PDF form in InDesign CC (2017) and have some text frames that I would like to place grey text that says things like 'Name', 'Job Title' etc which will be replaced when the answers are typed in.
I have looked through the forums and InDesign unable to find anything. Any help would be grand!
in acrobat pro select the frame, then right click and choose properties
Copy link to clipboard
Copied
in acrobat pro select the frame, then right click and choose properties
Copy link to clipboard
Copied
var message = 'Job title'
if (event.value == '') {
event.target.display = display.noPrint
event.value = message
} else {
event.terge.display = display.visible
}
_______
this is for not retype. Oscar you not added text
But text is still not grey. Can you add code for do this text in grey color please?
MrSa1ter​
As you understand - you can't do this in InDesign, but you can do in Acrobat.
Copy link to clipboard
Copied
text in grey:
select the frame, then right click and choose properties and choose the value of black
Copy link to clipboard
Copied
This is grey for filling text too. What about grey only for 'Job title" and after type something in the field using settings of your previous post?
Copy link to clipboard
Copied
I'm find the answer - Re: Place holders (ghost text) in Form text fields
Copy link to clipboard
Copied
right GeorgeS!
but I prefer insert numerics value.
For example:
instead of
event.target.textColor = color lt.Gray
i prefer for example insert
event.target.textColor = ["RGB", 135/255, 136/255, 138/255]
you can choose any value
Copy link to clipboard
Copied
to complete above information:
1) for grey placeholder text:
2) for typed black text
Copy link to clipboard
Copied
Thank you Oscar, thats brilliant.
Pointing me in the direction of Acrobat was what I needed. Im starting to realise that InDesign doesn't have all the answers and Acrobat is the solution.
I have avoided the Java Scripting option though, as I have had issues in the past.
Instead under the 'Options' tab, I set the 'Default value' to Job Title.
It just means that the Client has to highlight the Job Title text to replace it.
Thank you all for your help, especially you Oscar!
Copy link to clipboard
Copied
youre welcome!
Copy link to clipboard
Copied
Hi
I've been using your script to make the replaceable text in a text box, which is great... but when I go to print the document the new info added to the text box does not print. It does show up in a pdf, but for some reason does not print. Does this make sense?
So I want to be able to have the text that disappears be replaced by what the client types in (which you have supplied as a script), then have the info the client types in be able to print. When I go to print for some reason the texts boxes print empty.
Copy link to clipboard
Copied
Did you copy the text from post n. 2?
There is a error in the last line.
there is written "terge.display" instead of "target.display".
Then
var message = 'Job title'
if (event.value == '') {
event.target.display = display.noPrint
event.value = message
} else {
event.target.display = display.visible
}
Copy link to clipboard
Copied
YES! that was the problem. Thank you so much!
Copy link to clipboard
Copied
Is there a way to make it so the text disappears when the field is selected, instead of having to delete the text before filling out the form?
Copy link to clipboard
Copied
it is already so.
on clic the placeholder text disappears
Copy link to clipboard
Copied
This was so super helpful thank you. But could you please extrapolate the code for multiple lines of replaceable text for me?