How do I get the field to display on the form, but the box or field background shading doesn't print--only the user filled in content prints out.
Thanks,
MDawn50
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You would need to have script in the prePrint and postPrint events of each field that has a background fill colour. You could also set up a loop to look through all of the object and change the background colour, but that is a bit more complicated. Try this first.
prePrint:
var vName = this.somExpression;
var fieldObj = xfa.resolveNode(vName + ".ui.#textEdit.border.fill.color");
fieldObj.value = "255,255,255";
/* Check the type of object and change the .ui reference:
Date field = #dateTimeEdit
Dropdown = #choiceList
Checkbox = #checkButton
Text field = #textEdit
Numeric field = #numericEdit
*/
postPrint:
var vName = this.somExpression;
var fieldObj = xfa.resolveNode(vName + ".ui.#textEdit.border.fill.color");
fieldObj.value = "225,255,225"; // the original RGB of the object
/* Check the type of object and change the .ui reference:
Date field = #dateTimeEdit
Dropdown = #choiceList
Checkbox = #checkButton
Text field = #textEdit
Numeric field = #numericEdit
*/
You will need to change the .ui reference depending on the object type. For example the script above is for a textField.
Good luck,
Niall
Views
Replies
Total Likes
Hi,
You would need to have script in the prePrint and postPrint events of each field that has a background fill colour. You could also set up a loop to look through all of the object and change the background colour, but that is a bit more complicated. Try this first.
prePrint:
var vName = this.somExpression;
var fieldObj = xfa.resolveNode(vName + ".ui.#textEdit.border.fill.color");
fieldObj.value = "255,255,255";
/* Check the type of object and change the .ui reference:
Date field = #dateTimeEdit
Dropdown = #choiceList
Checkbox = #checkButton
Text field = #textEdit
Numeric field = #numericEdit
*/
postPrint:
var vName = this.somExpression;
var fieldObj = xfa.resolveNode(vName + ".ui.#textEdit.border.fill.color");
fieldObj.value = "225,255,225"; // the original RGB of the object
/* Check the type of object and change the .ui reference:
Date field = #dateTimeEdit
Dropdown = #choiceList
Checkbox = #checkButton
Text field = #textEdit
Numeric field = #numericEdit
*/
You will need to change the .ui reference depending on the object type. For example the script above is for a textField.
Good luck,
Niall
Views
Replies
Total Likes
Thanks for your quick response. I'll give this a try.
Margaret
Views
Replies
Total Likes
It worked perfectly.
Thank you.
Margaret Dawn
Supervisor - Documentation
W: 630-850-1065
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies