Expand my Community achievements bar.

Having difficulty setting the color in a fillable area of a text field.

Avatar

Level 1

I'm trying to set the background color of the fillable area in a text field to white. I've tried a few things but have been unsuccessful in changing the fillable area from the default, light blue color. I've tried using the Action Builder to create a button that will change the color but it only works on the caption background, not the fillable area background. I did find and example that uses a button with the following script:

xfa.resolveNode("Subform1.Name.ui.#textEdit.border.fill.color").value = "255,255,255";

but it doesn't seem to work at all. What am I missing?

My ultimate objective is for the form to display the user-entered text as if it's not a fillable field at all. I was planning to do this with a button that would "finalize" the form by locking all fields and changing the fillable areas to white so it looks like a plain-jane document. So, if there are any other ways to achieve that, I'm all ears!

Thanks,

Jake

2 Replies

Avatar

Level 10

If you already have a color in background and you just want to set it back to white, you can just hide the background color;

this.border.fill.presence = "hidden";

Avatar

Level 1

Thanks, Magus. I did more digging and now I feel stupid...it wasn't a problem with the buttons at all, I had the "Highlight Existing Fields" option turned on!

However, is there a way to incorporate your idea in a button? It would be cool to have borders around the fields until the user is ready to finalize, at which point the borders could be hidden. I messed around a little and couldn't make it work but I'm far from proficient with scripting.