You are viewing limited content. For full access, please sign in.

Question

Question

on submitting the form some of the values are not retained

asked on March 1, 2016 Show version history

This is the form before submission. Misc and Total are default to 10

 

Form after submission

Please help. I checked my javascript several times to see if that was causing the issue but could not figure out. 

0 0

Replies

replied on March 1, 2016

Those fields appear to be read-only based on your screenshots. Read-only fields that are modified by javascript AFTER the page loads are not stored by Laserfiche by default. There are a number of ways you can use javascript to correct the issue (removing the readonly attribute when you modify the value and then resetting it, or perhaps catching the form submit event and removing the readonly attribute at that time). You can search answers for other posts, I have seen several on this topic here before...

0 0
replied on March 1, 2016

The issue is that the "read-only" option on fields actually adds the "disabled" attribute to the input element of the field, and forms (I mean web forms in general) don't submit data inside disabled fields.

This is why we always use JavaScript to add the appropriate attribute ("read-only") to the field, like this:

$(document).ready(function() {
    $("#Field1").attr("readonly", true);
});

More info here.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.