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

Question

Question

Variables losing values on secondary form submission (lookup-related)

asked on August 14, 2015

Hi,

I ran into an issue with a form with 2 list fields that are filled via a database lookup.  The original submission form allows the user to select a Name and Department from a drop down (lookup) and submit.  

The approval form is a duplicate of this original form with a few fields added at the end.  All data from the first form is presented as read-only on the second form.  The field values appear when approving.

Once submitted, if you look at the approval form in the Results tab these fields are both empty.  This is also causing issues when trying to use these variables to populate a template (as the variables are now empty).

I came up with a workaround for the moment, by having the user create new fields for the Name and Department on the approval form and populating them with the variables from the first forms fields.  I'm looking for an easier way to address this, though, because re-engineering all of their forms with this workaround is going to be a very time consuming process.

Thanks!

0 0

Answer

APPROVED ANSWER
replied on August 14, 2015

In the approval form, don't make the drop down field read only from the UI. Instead, use JavaScript to disable the drop down field.

If the drop down field is q1 (Field1) then you can use

$(document).ready(function () {
  document.getElementById('Field1').disabled = true;
});

This way the submitter can select the value in the starting form. Then in the approval form, the drop down field can't be changed and when ultimately approved/rejected, the value will be retained.

0 0

Replies

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

Sign in to reply to this post.