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

Question

Question

Custom html doesn't show inputs on PDF that is filed into repository

asked on March 9, 2020 Show version history

I have inputs from single line fields that add dynamic text to a custom html within a form.  After the form is approved by a series of managers/directors a PDF copy gets filed into a folder within our Repository however the PDF is missing all the dynamic text in the html section.

The dynamic text is shown on the forms that pass between managers/directors for approval but disappears on the final PDF copy of the approval.  Does anyone know how this can be resolved as our HR dept wants to keep a copy of the form with all the legalese and fancy inputs.

Thank you in advance

 

This is a snippet of the code that is passing the field value into the html section:

$(document).ready(function(){
  $("#Field2").change(function(){
    readename();
  });
function readename()
{
  if($("#Field2").is("input")) 
    $("#ename").text ($("#Field2").val());
  else
    $("#ename").text ($("#Field2").text());
}

 

Capture.PNG
Capture.PNG (33.82 KB)
0 0

Replies

replied on March 9, 2020 Show version history

Your code is waiting for the value of field2 to change, and it will not do so without a user's input - and no user will provide input during the save to repository process. Easiest fix is to make a copy of your form and call it something like "Print Version". Then, run your code without a change listener (just call the readename function inside the doc ready statement, without wrapping in the on change function like you have now).

When your print version form loads, it should already contain the information from previous submissions so you should not need to wait for the change.

Also note that the saved form will not have Field2 as input - it will be a div. One easy way to see what the structure of the DOM will look like when it's being saved to the repository is to make this form a "starting form" temporarily. Then, in the Thank You message part, enable the checkbox to show the form.

3 0
replied on March 9, 2020

It's possible you could also use dataset variables to make it more dynamic, assuming the variables you need are saved to form fields.

For example,

<p>Update for <span id="#employeeName">{/dataset/Employee_Name}</span></p>

On the "live" form I would use JavaScript to replace the contents of the "employeeName" span dynamically, but on the "final version" it populates with the data saved for that variable, assuming it has been populated in a previous step.

replied on March 20, 2020

I was able to get this to work by using the dataset parameters and hidden fields as someone had suggested.  I passed the users provided information into another form and used an email task to send the submitter a copy of the original form with the built in dataset parameters.  Thanks for the suggestions!

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

Sign in to reply to this post.