I have a LiveCycle form that has 2 text fields (email and info) and a button. When the button is pressed, the 2 text fields are set readonly and the button is set hidden. A rich text field is populated to provide a mailto link using the email and info text fields:
form1.firstpage.HyperlinkSF.rtField.value.exData.loadXML(sRichText, false, true);
This appears to work fine, but when I save the form and re-open it, the readonly fields are now editable and the button has re-appeared. If I remove the functionality associated with the rich text hyperlink, the form correctly re-opens with the readonly fields set readonly and the button is not visible.
Any idea why populating a rich text field is affecting the form state on saving/re-opening?
Views
Replies
Total Likes
Hi,
I don't think your problem is directly related to populating a rich text field, at least I haven't had a problem doing this. Here's an example of updating rich text Adobe LiveCycle Designer Cookbooks by BR001: Programmatically updating Rich Text (or xHTML) and this one Adobe LiveCycle Designer Cookbooks by BR001: Adding values in a form to an email
Is it possible that you add a link to your form in this thread, so we can have a look.
Regards
Bruce
Views
Replies
Total Likes
Thank you Bruce for your very helpful links.
I see that I had incorrectly formed the rich text body tag. I had omitted:
xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
I had also been unable to get the &body= of the mailto working, and see that I should have had & as in:
var sURL = "mailto:" + sTo + "?subject=" + sSubject + "\&body=" + sBody;
All appears to work as expected. Great links. Thanks!
Robin
Views
Replies
Total Likes