Set a rich text field on load
- Sebastian Haugland
- Posts: 43
- Joined: Fri Sep 19, 2014
- Contact:
Hi
I think you have replied to this before but I cant find it...
I have a rich text field called "Description" and want to add a new line with the date automatically when the user hits a button - so that he can add text to the field fafter the date. As far as I remember you can't do this and a workaround was to add the line on load / before the form becomes visible.
How do you do that? either from a button or from "form load"
I think you have replied to this before but I cant find it...
I have a rich text field called "Description" and want to add a new line with the date automatically when the user hits a button - so that he can add text to the field fafter the date. As far as I remember you can't do this and a workaround was to add the line on load / before the form becomes visible.
How do you do that? either from a button or from "form load"
Just add the following code to the onclick handler for the button in Forms Designer:
Code: Select all
fd.field('Description').control()._el()
.find('.ms-rtelong').contents()
.find('body').html('<p>your date value goes here</p>');
- Sebastian Haugland
- Posts: 43
- Joined: Fri Sep 19, 2014
- Contact:
Thanks don't know why I thought I had to write before form load...
-
- Information
-
Who is online
Users browsing this forum: No registered users and 2 guests