Hi
I have a thorny problem (well, for me at least) - I have a form that has 10 fields on it - lets call the form fmTest and the fields field_1 to field_10. I also have a field called doc_type that tells me which of the fields are mandatory fields - if doc_type = 1 then mandatory fields may be field_2, field_4 and field_7 => if doc_type = 2 then field_1 and field_3. What I would like to do is change the background color of the fields so that they are white when they are not mandatory and red when they are (or have the fields bold and not bold when entering). This application will be running exclusively in the Notes Client.
One possible option is to create 2 fields for each entry setting one normal and one bold - I could then hide the incorrect field depending on doc_type. This solution seems a bit clumsy :o(
I would also optimally like to set the background to red if the mandatory field is empty and to gray when it has been filled out. I often see this type of data checking on forms that are used on the web :o)
Any ideas? Can I somehow do this using JavaScript in the Notes client? If so could you perhaps post some code as my Javascript in non-existant!
Thanking you in advance
Ursus
Subject: background color for fields in error
Could you set up layers that have the desired background colors under the appropriate fields for the various scenarios, and then use hide-when formulas on the layer anchors so that the appropriate layer is displayed?
Subject: RE: background color for fields in error
Hi Martha
thank you very much for your idea - yes, that would be one way to do it (I always forget layers :o) but I was thinking more along the lines of the background color for the actual field i.e. the field I am currently typing in has black text on a white background - I would like the empty field to have black text on a red background and then, as I start typing my first character I would like the background to change to white indicating that the field is now no longer in error.
I was thinking more along the lines of @FieldBackground (@ThisField, “Red”) :o)
Thank you again for your answer :o)
Ursus
Subject: RE: background color for fields in error
It’s not possible at the moment (it would require run-time modification of the Rich Text that makes up the form), but it has been submitted as an Idea over at ideajam.net. Feel free to log in and promote the idea.
In the meantime, the ol’ red asterix trick will have to do.
Subject: RE: background color for fields in error
Hi Stan
Thank you for your answer. I don’t really need it for rich text (they’re just simple number / text fields) although I assume that the problem is not only for RTF.
Anyway, thank you for your input :o)
ursus
Subject: RE: background color for fields in error
Just FYI: the form’s UI design itself is Rich Text (stored in the $Body item of the form design note). I wasn’t referring to rich text fields you’d create on the form.