Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Email XML for only a certain number of pages

Gravynoir
Level 2
Level 2

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

0 Replies
past-tense
Level 4
Level 4

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

dcidev
Level 8
Level 8

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