Hi team,
Wondering whether or not the community may be able to assist here. Some of you may be familiar with a solution that Eric Anderson & Co. created back in 2014 which helped solve the issue of HTML values not storing after a form was submitted.
Now, for those wondering what use storing HTML values could possibly have - aside from the one cited in Eric's example, the most popular use of this hack is Laserfiche Form based "e-contracts".
Think simple sales contracts, service contracts, support agreements etc. Sending your customer a form that has an HTML text block that contains dynamic values which were looked up from a database is an incredibly useful hack that has worked quite well, until recently.
So let's kick off with an example..
Here's our example Sales Contract:
When you submit the form, you are met with this:
Notice that the values above are stripped from the Form. This wasn't always the case - and in the past these values would stick around and be stored. (Again, see Eric's post above for screen shots of this)
Our example form is very straight forward and includes the following fields:
The HTML block contains the following code:
<br>This is a contract between you "The Customer", and ACME New Zealand Limited. <br>You will subscribe to our monthly service for <div id="txtTermPlaceHolder">TERM</div> months, paying <div id="txtFeePlaceHolder">FEE</div> per month. <br>There will be a one time set up fee of <div id="txtSetupPlaceHolder">SETUP</div>. <br>Submitting this form acknowledges your acceptance of the contract.
The Javascript used is:
//Contract Generator Code for LF Forms 10 $(document).ready(function(){ //Monthly Fee //Find the controls var divFee = $('#txtFeePlaceHolder'); var txtFee = $('#q2 DIV.cf-field INPUT, #q2 DIV.cf-field SPAN'); //Remove the textbox from its current location txtFee.remove(); //Insert it after the place holder txtFee.insertAfter(divFee); //Remove the place holder divFee.remove(); //Hide the old label $('#q2').hide(); //Setup Fee var divSetup = $('#txtSetupPlaceHolder'); var txtSetup = $('#q3 DIV.cf-field INPUT, #q3 DIV.cf-field SPAN'); txtSetup.remove(); txtSetup.insertAfter(divSetup); divSetup.remove(); $('#q3').hide(); //Service Term var divTerm = $('#txtTermPlaceHolder'); var txtTerm = $('#q4 DIV.cf-field INPUT, #q4 DIV.cf-field SPAN'); txtTerm.remove(); txtTerm.insertAfter(divTerm); divTerm.remove(); $('#q4').hide(); });
And the output should look like:
To make things as clear as possible, I've also put together a quick video overview of the issue.
So team, does anyone have any suggestions or ideas on how we can get this 'hack' working again?
Any ideas why it no longer works in version 10?
I've attached the business process template used - just rename it from .txt to .xml.