I am developing a form and would like to highlight a textfield to remind the user to enter required information. This textfield will include a paragraph (set with default text) with certain portions that require the user to manually enter information while keeping the rest of the content. I would like the textfield to highlight in yellow upon opening the form and then turn off the highlighting or turn the content background to white when the user modifies the default text.
My apologies for the delayed response. I have tried it on two computers with the same result. Unless there is another script that may work without turning on/off the Highlight Existing Fields feature, it would appear that I will not be able to achieve the desired result for my form.
The runtimeHighLight property is one of the users application preferences. It is the same as if you went into Edit ... Preferences ... Forms and change the highlight color options there.
Maybe you have one of the other settings there getting in the way. Can you try a different computer and see if the same things happens?
Yes sorry, it was meant to be a lower case "F." I tried the script in the docReady event as suggested and it did not turn off the Highlight Existing Fields option. Just to make sure none of my form parameters/settings were preventing the script from working correctly, I entered the script on your provided test from without success.
I did have a glimmer of hope when I saved it as a static form and then back to a dynamic form. For some reason that turned off the highlighting during that odd moment. Of course, it also turned off highlighting for all of my adobe forms. Once I chose the option to highlight the fields again, it of course stopped working. It seems odd that changing the Highlight Existing Fields option on one form affects all of my PDFs. Is there any way around this or do you have any other suggestions? Thank you.
your code to turn off highlighting should work, as long as the "F" of false is in lowercase, if that just some sort of auto correct in this forum? And, I would put it in the docReady event.
There is more about the field highlighting, with a sample, in Niall's blog, https://experienceleaguecommunities.adobe.com/t5/adobe-livecycle/ct-p/adobe-livecycle-community
The script works when I turn off the highlight fields option on my form. Unfortunately, turning it off also turns it off for all of my forms in Adobe. Is there any way to customize this setting for the form itself to where it does not affect my overarching Adobe settings? I tried the following script in the Form Ready event without success. Any suggestions would be greatly appreciated. Thank you.
app.runtimeHighLight = False
The script works perfectly as long as I click to highlight the fields first. For some reason, my form does not have the option to highlight the fields at the top of the form. Is there any way to enter a script in the Initialize event to automatically highlight the fields? I have searched and tried a few different scripts in various events to achieve this, but without success. I would upload my form, but I am building it on my company's isolated network. I greatly appreciate all of your help.
I guess there is something my code does not allow for in your form, are the fields in a repeating block, or are the field names duplicated?
My test form for the code is;
Can you share your form, just upload to whatever site (google docs, dropbox, etc) and post a link in this thread.
Bruce, Thank you very much for your response. When I insert the script into the layout.ready event, the following occurs:
- Field does not highlighted upon opening the form
- Field highlights yellow when the user clicks on the text field to modify the default content
- If the user modifies the default content, then the text field will not highlight again upon entering/exiting the field
- If the user does not modify the default content, the highlight will turn off upon exiting the field, but will turn back on when the field is reentered.
Ideally what I am looking for is the following condition:
- Text field highlights yellow upon opening the form
- When the default content is modified, then the highlighting is turned off
- If the user enters the field, but fails to modify the default content, the field will continue to be highlighted yellow.
Thank you very much for your recommendation of using floating fields. However, that option would not work well with my form. Any additional insight you may have would be greatly appreciated. Again, thank you for your response.
Try this code in the layout.ready event
You could also try having separate fields for the portion of the default text that can change and then using floating fields display the values in a paragraph, depending on the amount of text and the number of them that could be easier for the form filler.