Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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...
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
You can use the code I provided before, just change "BLANK" to "BYE" in the code.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Yes, like this:
event.target.textColor = (event.value=="" || event.value=="BYE") ? color.white : color.black;
Copy link to clipboard
Copied
You are my lifesaver! Thank you so much for your patience and all of your help!
Copy link to clipboard
Copied
Is there a way to only highlight the cell when there's text entered - but when it's left blank, it stays white?