Email XML for only a certain number of pages

Avatar

Avatar
Validate 1
Level 1
Gravynoir
Level 1

Likes

0 likes

Total Posts

21 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
Gravynoir
Level 1

Likes

0 likes

Total Posts

21 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
Gravynoir
Level 1

13-03-2013

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 5
dcidev
Level 5

Likes

30 likes

Total Posts

448 posts

Correct reply

77 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 5
dcidev
Level 5

Likes

30 likes

Total Posts

448 posts

Correct reply

77 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
dcidev
Level 5

13-03-2013

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

Avatar

Avatar
Give Back 3
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct reply

10 solutions
Top badges earned
Give Back 3
Give Back
Validate 1
Boost 5
Boost 3
View profile

Avatar
Give Back 3
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct reply

10 solutions
Top badges earned
Give Back 3
Give Back
Validate 1
Boost 5
Boost 3
View profile
past-tense
Level 2

13-03-2013

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