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



Javascript Modern Form Builder Limitations

asked on November 18, 2022

Are there limitations to what can be done using Javascript in the Modern Form Builder in Laserfiche Cloud? I'm copying very simple code from our on-premise installation and it does not work. My end goal is to mask inputs, but I can't even get console.log() to work on an html element change.

This simple code does not work in the Modern Form Builder, but does with the Classic Form Builder:

$('html').change(function() {
    console.log('hello world');

I am calling the jQuery library from the external sources tab, and there are no errors in the browser's console.

This code does work with the Modern Form Builder, which also uses jQuery.

$(document).ready(function() {
    console.log('hello world');

Is the jQuery .change() function not supported?

If I can't get this to work, I require some way of masking inputs. I'm using the Regular Expressions option for the relevant fields currently, but the error a user receives when improperly entering a field is not helpful as it shows them the regex code which they won't understand. Plus, masking prevents the user from making many types of mistakes in the first place.

Also, copying code from the Laserfiche Cloud Javascript editor does not work. Copying code from another source into the Javascript editor does work. I'm unsure if this is intended, but I had to manually type the above code because it does not allow copying.

0 0


replied on November 21, 2022

Hi Michael

The Classic Form Designer in Cloud supports JS the same as you would onPrem. The Modern Forms Designer does not support "freestyle" JS, but instead uses their own LFForm Objects.


You can learn more about LFForms syntax and capabilities at

1 0


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.