I am creating a bracket style form pdf. each bracket will have a form field to add a name but there will be instances the bracket needs to be left blank due to the rotation of people. is there a way to either fill a field in with "Blank" or leave it blank that the background color changes to black? Picture enclosed of my bracket example.
Both are possible. Which one do you prefer? If you want to change the field's fill color then you have to disable the highlight color, though.
I would really like to make the box all black if there is no info to put into that field. Any suggestions on how I go about doing this? Thanks.
When should it change, then? If the field is black when the user clicks into it they won't be able to see what they're typing...
I want it to change if the user does not fill the field out or an option is if they type the word "BLANK" the box changes to black.
You didn't really answer my question, but OK... Here's how I would do it.
Set the field's fill color to black, and apply this code as the field's On Focus script:
event.target.fillColor = color.white;
And this code as its Validation script:
event.target.fillColor = (event.value=="" || event.value=="BLANK") ? color.black : color.white;
Sorry I am not just getting back into this project.
To Clarify because my original question/comments were vague. I want the box to remain white fill/black outline as you can see in the first picture I posted. I would like the box to change to a fill of black should the person type the word "BYE" into the field. Does this make better sense? Thanks for the help.
You can use the code I provided before, just change "BLANK" to "BYE" in the code.
Thanks again for all the help, but i have 1 more question. I was able to get the box to change to black, so thats awesome! Is there a way for me to change the type in that black box to be white when BYE is entered?
Yes, like this:
event.target.textColor = (event.value=="" || event.value=="BYE") ? color.white : color.black;
You are my lifesaver! Thank you so much for your patience and all of your help!