Copy link to clipboard
Copied
I have a form with 16 pages, each with 2 or more fields, and most have simple validation rule or calculation; and it is in Chinese. It loads OK, but it takes over a minute to go from one field to the next after I complete my input. I have tried this on an old Nexus 7 tablet and a Samsung Note 4. I was able to move through the fields in the same form on an old iPad 2 with no issues. It "appears" the system is looping through every field on the form before it moves to the next.
Am I missing something or is that the current level of support on Android?
I use javascript for most fields because of the limited support on Mobile platform. For example, because I cannot use the defaultValue or the required properties, I end up setting the default value to a single blank, leave the format as None and use the following validation logic to ensure an integer is entered for a required field ..
//VALIDATION for integer field
event.rc = true;
if (!(isNaN(event.value)) && event.value !== " ") {
if (((event.value<0) || (event.value>99))) {
app.alert("无效值:必须大于或等于 0 并小于或等于 99 的整数。");
event.rc = false;
} else if ((Math.round(event.value)) != (event.value)) {
event.value = Math.round(event.value);
}
} else if (event.value !== " ") {
app.alert("无效值:必须大于或等于 0 并小于或等于 99 的整数。");
event.rc = false;
}
Copy link to clipboard
Copied
Further to my post above, this is how long it takes to 'validate' or move from one field to the next
(1) when the form has 16 pages ... roughly 80 seconds
(2) when the form has 3 pages ... roughly 20 seconds
(3) when the form has 5 pages ... roughly 80 seconds
... this makes the form ususable.
Copy link to clipboard
Copied
So I removed almost all the Validation javascript and the performance is still unacceptable.
This is what I have now ...
(1) each page may have 2-3 fields
(2) the first field has a FORMAT of a number with zero decimal places and no VALIDATION
(3) the second field has a simple CALCULATION based on the first field, like the following
//CALCULATION for 得分
event.rc = true;
var calc = getField("班级11_无法记住福星号人数").value;
var result = 0;
var limit = 10;
if (calc <= limit) {
result = limit - calc;
}
event.value = result;
(4) the third field is a string input for a comment field with no VALIDATION
When there are 3 pages, it takes about 20 seconds to move from one field to the next after input; and 30 seconds for 5 pages and so on. It appears the system goes through all the fields regardless; so the more fields there are, the slower it gets.
I believe there is something wrong with the Android implementation as I don't have the performance issue on the iPad.
Any help or suggestion would be appreciated ... even a simple confirmation that fillable forms are not quite ready for the Android platform.
Copy link to clipboard
Copied
I have found the same trouble. On one of my forms, code that prevents unacceptable choices in a bunch of checkboxes took so long (over 30 seconds) that the Reader seemed to forget what it was supposed to do!
I have found that the cause of these delays is probably the way that Reader for Mobiles handles JavaScript. although I have never found any statement by Adobe about this, it appears to me that Reader for Windows compiles all the javaScript in the form when the form is loaded. Reader for Mobiles does not do that. Instead, it appears to interpret JavaScript that is called, as it is executed. This takes a lot longer than executing a pre-compiled set of code. And further, the interpretation spends AGES going through comments! I always right heaps of comment in my code, to assist others that may have to work on it. I found that removing X lines of comment made a huge reduction in execution time - more so than removing X lines of code!