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

Question

Question

Selecting Custom HTML Elements with Javascript in New Form Designer

asked on January 18, 2022

Hello All, 

 

The past couple of days I have started using the Javascript function in the new Forms Designer. Full disclosure, I am by no means a developer or fluent in Javascript but have been able to put together some simple form enhancements in the classic Form Designer.

 

I'm finding the LFFORM much easier to use than Jquery for selecting fields, but cannot figure out how to select custom html elements. The documentation doesn't mention selecting other elements https://doc.laserfiche.com/laserfiche.documentation/en-us/Subsystems/ProcessAutomation/Content/Forms-Current/Javascript-and-CSS/TheLFFormObject.htm 

 

I have tried to simply copy over my Jquery code and tried html ids, css tags, and field ids and had no luck thus far. 

 

My current use cases are for a dynamic iframe, old code below and for some custom button functionality.

$( document ).ready(function() {
  
      changeIframe();

  
  $( "#q4" ).change(function() {
    changeIframe();
  });
     


  function changeIframe(){

    $("#myframe").attr("src","https://{laserficheURL}&docid="+ $( '#q4 input' ).val() +"#?openmode=OFFICE&mode=embed");

  }

});

 

If anyone knows a solution using the LFFORM Object or otherwise I would greatly appreciate it.

1 0

Replies

replied on March 1, 2022

I'd be interested to get an answer to this too. Based on the documentation, the LFForms object seems a bit limited so I'm wondering if there is functionality beyond what is spelled out in the doc.

0 0
replied on February 23, 2023

Information on this would be great for us as well.

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

Sign in to reply to this post.