Enhanced Rich Text
Hi,
I have a form with the following fields:
Link: Hyperlink Field - (ex.: hyperlink: "http://www.plumsail.com" , description: Plumsail)
Description: Multiline plain text - (ex.: SharePoint Solutions)
Formatted Description: Enhance Rich Text
I would the user to only fill in the link and the description fields, and get the form to auto populate the enhanced rich text accordingly following the example like this: <h3><a href="http://www.plumsail.com" target="_blank">Plumsail</a></h3><h2><span class="ms-rteThemeForeColor-3-0">SharePoint Solutions</span></h2><br>
Appreciate if you can help me achieve this.
Thanks,
I have a form with the following fields:
Link: Hyperlink Field - (ex.: hyperlink: "http://www.plumsail.com" , description: Plumsail)
Description: Multiline plain text - (ex.: SharePoint Solutions)
Formatted Description: Enhance Rich Text
I would the user to only fill in the link and the description fields, and get the form to auto populate the enhanced rich text accordingly following the example like this: <h3><a href="http://www.plumsail.com" target="_blank">Plumsail</a></h3><h2><span class="ms-rteThemeForeColor-3-0">SharePoint Solutions</span></h2><br>
Appreciate if you can help me achieve this.
Thanks,
Check internal names. You can also just hide the formatted description field with CSS ('display: none;')
Code: Select all
fd.field('FormattedDescription').readonly(true)
fd.onsubmit(function(){
fd.field('FormattedDescription').readonly(false);
fd.field('FormattedDescription').value('<h3><a href="'+fd.field('Link').value()[0]+'" target="_blank">'+fd.field('Link').value()[1]+'</a></h3><h2><span class="ms-rteThemeForeColor-3-0">'+fd.field('Description').value()+'</span></h2><br>');
return true;
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 16 guests