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

Question

Question

Stored DIV does not show once form is submitted

asked on April 6, 2016 Show version history

I am using the code found [HERE] where I am using a hidden field to place text inside an HTML field.  Everything is working correctly when the form loads, but when I submit, using a custom HTML button (different html field), the value does not appear in the submission.  Below is the code I am using to place this field inside my HTML DIV.  

//Insert SAF Number
  var SAF = $('#SAF');
  var SafSource = $('#q64 div.cf-field INPUT');
  
  SafSource.remove();
  SafSource.insertAfter(SAF);

Here is my HTML code:

<p style="text-align: center;"><b><font size="5.5">Service Authorization Form</font></b></p>
<div style="border-style: none; text-align: center;"><div id="SAF"></div></div>

Custom Button HTML:

<div style="text-align: center;"><font size="5"><button class="approve">Approve</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button class="reject">Reject</button></font></div>

Button Javascript:

//Button clicks
  $('button.approve').click(function() {
    $('#q75 input').val("approve");
  });
  $('button.reject').click(function() {
    $('#q75 input').val("reject");
  });

Here is what I see when the form loads:

Here is what I see when the form is submitted:

Thanks,

Nate

0 0

Replies

replied on April 20, 2016

We are using the same code and having the same issue.

0 0
replied on April 20, 2016

I found a work around for this.  I created a second form in the same process and used the dataset to insert the values into the HTML box.  It has to be opened for the values to populate correctly, but that wasn't going to be an issue as I had a user task in my process that will open the form for review and approval.  When saving to the repository it used the second form.  Hope that helps.

0 0
replied on April 22, 2016

Unfortunately, I do not have that option.  This is a public form that will not be completed by participants/users.  I need something to make this work for a public form...  Thanks for your help, though.  

Nate

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

Sign in to reply to this post.