I am using the script below to add user instructions to Textfields. I would like to do the same thing with textfields formatted for rich text but this script stops working when i set the field to accept rich text. Can you tell me how to modify the script so it will work in a ttext field that will allow the user to enter rich text?
MeetingMinutes.#subform[2].Attendees::initialize - (JavaScript, client)
this.execEvent("exit");
this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";
MeetingMinutes.#subform[2].Attendees::enter - (JavaScript, client)
this.fontColor = "0,0,0";
this.font.posture = "normal";
MeetingMinutes.#subform[2].Attendees::exit - (JavaScript, client)
if (this.isNull)
{
this.fontColor = "153,153,153";
this.font.posture = "italic";
}
MeetingMinutes.#subform[2].Attendees::prePrint - (JavaScript, client)
this.format.picture.value = "";
MeetingMinutes.#subform[2].Attendees::postPrint - (JavaScript, client)
this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";
Thank you,
-Don
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Don,
Similar to your script above, but try this in the enter event:
if (this.rawValue === this.assist.toolTip.value) {
this.rawValue = "";
}
and then this on the exit event:
if (this.rawValue === null) {
this.rawValue = this.assist.toolTip.value;
}
Alter to suit formatting and initialize event, etc.
Niall
Views
Replies
Total Likes
Hi Don,
I don't think that you will be able to get this working with a rich text field. The Object > Field Patterns is disabled and implementing it within the XML Source wont work:
I suspect that this is because the text field has an exData one of child property when rich text is turned on.
It is one or the other (rich text field OR null patterns).
Good luck,
Niall
Views
Replies
Total Likes
Is there any script or way to add user instructions that will be automatically deleted when the surer enters that field? Currently, users are leaving the instruction in the field which is confusing when you receive the form.
Thanks for your reply.
-Don
Views
Replies
Total Likes
Hi Don,
Similar to your script above, but try this in the enter event:
if (this.rawValue === this.assist.toolTip.value) {
this.rawValue = "";
}
and then this on the exit event:
if (this.rawValue === null) {
this.rawValue = this.assist.toolTip.value;
}
Alter to suit formatting and initialize event, etc.
Niall
Views
Replies
Total Likes
I left off part of my question. Will the script suggestion you added work if dormatted for rich text? I need to keep that field as rich text.
Thanks so much for your help Niall.
-Don
Views
Replies
Total Likes
Hi Don, the above works with a rich text field...
Niall
Views
Replies
Total Likes
I added the script that you sent to what i already had and set the textfield to rich text. So far, everything seems to work correctly.
Thank you so much for your help.
-Don
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies