Hi Guys,
Is there any code that I can add so I only send an email of XML for the first 7 pages of my document. I need this to happen as I have a button that asks for a password to unlock the rest of the form. The reason to this is because I only want one person to see the first 7 pages and then email it to the person who has the password to view the rest.
As of now the email button sends the complete code and I don't really want that to happen as anyone could then get the XML and just open it up.
Regards
Views
Replies
Total Likes
Hey there,
Unfortunately, as far as I'm aware, you cannot selectively submit partial data. That being said, you can specify 'No data binding' on those fields that you don't want to be sent, and it won't be included in the xml.
Alternatively, you can how the form submit itself as a pdf, with whatever locking code that you have in place to determine what is visible in the sent form.
Let us know if this helps at all, or if you have any specific questions,
-Scott
Views
Replies
Total Likes
If you only have the one field, you can create a regular button that stores the password in a temporary variable, clears the field, emails it, then puts the password back into the field. Here's an example:
var mypassword = PasswordField.rawValue;//store the password field value in a variable
PasswordField.rawValue = "";//clear the field and the resultant xml
event.target.submitForm({cURL:"mailto:me@me.com",cSubmitAs:"XML"});//mail the form with attached xml
PasswordField.rawValue = mypassword;//bring the password back into the field
Another option, if there are many fields you don't want to be in the xml is to store all the xml in the variable then clear all the fields you want then re-import back into the form using xfa.saveXML() and xfa.loadXML().
Kyle
Views
Replies
Total Likes