Hi
I created a pdf mathematic scool book for children
this book has the option to submit every page as a form to the teacher
on every page on the bottom the student has a button when he clicks it
i run a javascript code that sends the field on the page to the teachers email as a fdf file
all is working grate on pc
on android when i click the submit button nothig happens.
this is the code
// send to teacher
var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()
var todayDate = day + "/" + month + "/" + year;
var lineBrake = "%0D%0A";
var teacherEmail = getField("email_teacher").value;
var teacherName = getField("name_teacher").value;
var studentEmail = getField("email_student").value;
var studentName = getField("name_student").value;
if(teacherEmail==""){
app.alert("enter teachers email");
}
else if(teacherName==""){
app.alert("enter teachers name");
}
else if(studentEmail==""){
app.alert("enter student email");
}
else if(studentName==""){
app.alert("enter students name");
}
else{
var emailSubject = "work page from:" + studentName;
var emailBody = "attached work page from:" + studentName + lineBrake + todayDate;
var aSubmitFields = new Array(
"lesson1-page8-1a",
"lesson1-page8-1b",
"lesson1-page8-1c",
"lesson1-page8-1d",
"lesson1-page8-1e",
"lesson1-page8-1f",
"lesson1-page8-2b1",
"lesson1-page8-2b2",
"lesson1-page8-2b3",
"lesson1-page8-2c1",
"lesson1-page8-2c2",
"lesson1-page8-2c3",
"email_teacher",
"name_teacher",
"email_student",
"name_student"
);
this.submitForm({
cURL: "mailto:"+teacherEmail+"?subject=" + emailSubject + "&body=" + emailBody,
aFields: aSubmitFields,
cSubmitAs: "FDF" // the default, not needed here
});
}
Adobe Reader for Android does not yet support HTTP submit of form data. It supports sending the PDF as an email attachment. If you have a "Submit" action that sends email on a button, that will trigger this by launching the email app with the PDF attached, for the user to confirm/send. I'm not sure that's what you want, though.
Dennis
Hi Dennis,
Is there any update on this? I would like to know if there is any plan to include the javaScript actions on buttons in 2013. I am particularly interested in this action:
this.submitForm({cURL:"myUrl", cSubmitAs: 'PDF'});
With the hight increase on the number of tablet devices out there and BYOD movement, the lack of this functionality is making us to look into different options for collecting data outside Adobe Forms.
Regards,
Renier
This is a User 2 User forum so most of the responders will have no knowledge or if they do because they are included in a Beta test but cannot discuss the possibilities due to non-disclosure agreements and the fact that Beta version's features can change prior to public release.
There is also the fact that different mobile apps work differently with regards to JavaScript.
North America
Europe, Middle East and Africa
Asia Pacific