reset all formfields background color on preprint event

Avatar

Avatar

visioned

Avatar

visioned

visioned

14-04-2015

Hi collegues,

Is there a way to reset all form field background color on preprint event.

For instance on a printbutton event.

Hope anyone has a solution?

Regards,

Ed Boon

Accepted Solutions (0)

Answers (5)

Answers (5)

Avatar

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

15-04-2015

Hi Ed,

I was only intending to give you an approach to handle the problem, you will have to extend it to suit your particular situation.

Regards

Bruce

Avatar

Avatar

visioned

Avatar

visioned

visioned

15-04-2015

Hi Bruce,

This solution only shows a border in a subform but not sets the background fields to white.

Or do I something wrong.

Regards,

Ed

Avatar

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

14-04-2015

Hi,

If in the prePrint event for you subform/fields you set the color to white with code like;

this.border.fill.color.value = "255,255,255"

then in the postPrint event you can revert to the design time color with;

this.border.nodes.remove(this.border.fill)

Removing the fill node will revert to the original color.

Regards

Bruce



Avatar

Avatar

visioned

Avatar

visioned

visioned

14-04-2015

Hi Magus,

This is a nice and helpful script but not for my purpose.

I mean to reset the colored fields to white to save toner when form is printed.

Are you familiair with this.

Regards,

Ed

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

14-04-2015

Hi there,

I've created a script object which is really similar to what you are trying to do.

Here is the link : Validation / Reset Functions, easy to manipulate and to change Forms!!!!

The PDF provided on the forum is to validate / reset any form, the validation is setting all fields which are null with red borders,

when validating again it removes the red borders if a value is inserted, you can use the function easily to remove the borders or background color of any field when you print the form.

just make sure to be consistent with the values you are editing and everything will be working fine!

If you have any question, you are welcome to ask!

Hope this help!