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

Question

Question

Custom html input made permanent

asked on March 3, 2014

I have been trying to put in custom HTML with input tags within my form. When I fill out the form the input that was done is not saved/made permanent on the page. Instead I am still able to edit these fields when looking at the results and the input fields are blank.

 

0 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on March 4, 2014

The issue is that your custom input fields do not have variables and their values aren't stored. If possible, I'd suggest using a date field and then using its value to populate this sentence-style construction. If you have to have this custom HTML field with input boxes, you'll need to use some hidden fields and JavaScript to get these input boxes to populate with the appropriate values.

  • JavaScript will pull the day, month, and year values from the custom HTML input fields, like so:
var month = $('#q17').find('.month').val();
var day = $('#q17').find('.day').val();
var year = $('#q17').find('.year').val();
  • Once you have these values, use JavaScript to put them into some hidden fields (so the values will be stored).
  • On page load, use JavaScript to check if these hidden fields have values, if they do, place these values into the custom HTML input boxes or, better still, replace the custom HTML input box with a paragraph of text that has the appropriate values in it.
0 0

Replies

replied on March 3, 2014

Could you provide more details on what you're trying to accomplish with these input fields?

0 0
replied on March 3, 2014

I'm trying to do something along the lines such as this:

 

THIS AGREEMENT is made this day of  , 20 by and between

 

where the underscores are is where I want to fill in and make permanent. My HTML code is as follows.

 

<b>THIS AGREEMENT</b> is made this <input class="day" type="text" min="1" max="31" maxlength="2">day of&nbsp;<input class="month" maxlength="10">&nbsp;, 20<input class="year" type="text" maxlength="2">

 

The issue is I am able to fill out the input though after hitting submit the items filled out do not stay permanent and I'm able to fill out the form in those areas again.

0 0
replied on March 4, 2014

This is likely because the representation in the results are not images (i believe). You are using a webpage to show the results and since the HTML there was not recorded with the changed values, then it messes up. 

 

What are you trying to accomplish? Would making a field where you make big bold areas blank and allow the input in LF Forms fields underneath not acceptable? Doing it this way, you could also have some javascript that changes the HTML text when a user inputs the values into those fields. That would still be something you need to see if it would come through in the Results area though.

0 0
APPROVED ANSWER SELECTED ANSWER
replied on March 4, 2014

The issue is that your custom input fields do not have variables and their values aren't stored. If possible, I'd suggest using a date field and then using its value to populate this sentence-style construction. If you have to have this custom HTML field with input boxes, you'll need to use some hidden fields and JavaScript to get these input boxes to populate with the appropriate values.

  • JavaScript will pull the day, month, and year values from the custom HTML input fields, like so:
var month = $('#q17').find('.month').val();
var day = $('#q17').find('.day').val();
var year = $('#q17').find('.year').val();
  • Once you have these values, use JavaScript to put them into some hidden fields (so the values will be stored).
  • On page load, use JavaScript to check if these hidden fields have values, if they do, place these values into the custom HTML input boxes or, better still, replace the custom HTML input box with a paragraph of text that has the appropriate values in it.
0 0
replied on November 8, 2016 Show version history

Did you find a solution to this issue? I am experiencing the same results.  I am inputting text so the date solution offered will not work in my situation.  

0 0
replied on January 18, 2018

I am having the same issue on multiple forms. Seems to be an HR thing, they want the person to fill their name out directly in the sentence. But when you save to the repository, the information they typed in disappears. It is nothing more than a basic input field, we are not worried about saving the information, just the image of the form.

 

0 0
replied on January 19, 2018

As previously mentioned what I had done was I created a field and made it a hidden field on the form to store the value. I then used JavaScript to populate that area in the custom HTML.

0 0
replied on January 19, 2018

There is an input field there though, you would have to populate a span if you want it to stick. Are you using javascript to remove the input field and replace it with a span immediately after the user clicks out of it?

0 0
replied on September 7, 2022

I have a similar issue. I have two forms in one forms project, start and print. I need the filled out form saved as PDF to the repository. The start form hides and shows parts of the form based on answers. At the point the form is ready to save to the repository as a PDF a submit button is shown. If the system would simply save the form in its current state in the browser, all would be well and I wouldn't need a print form. It however does not, the save to repository as PDF re-runs the entire form from the beginning. Since there is now no one to answer the questions nothing is shown except the first question, everything else is hidden. 

This is the reason for the print form in the project. I have access to all of the standard forms variables that have been peen populated in the start form by coping the start form into the print form the two forms share data. What I cant get to work is the custom HTML. I can use jquery to insert static date into a div’s html, but can’t get it to take the data from a standard single line field containing the required data. I am also showing the hidden filed “hRev” in the saved PDF so I can see that is does have the required data.

When  I do the following tried with and without “.change()”:

$('.rev').html('Rev: ' + $('.hRev input').val()); //the output is: “Rev:” without quotes.

$('.rev').html('Rev: ' + $('.hRev input').text()); //SAME

$('.rev').html('Revx1: ' + $('.hRev').text()); //I get the following, with my data clearly stuck inside “Rev: 2018/04/10”.

Revx1: hRevfield type single lineRev: 2018/04/10hRevInput blocked. Maximum character limit of 4000 characters reached.

I just can’t extract from or load into the custom HTML of the print form. It works just fine in the start form.

 

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

Sign in to reply to this post.