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

Question

Question

Modern Forms Designer Google places auto complete API

asked on September 11, 2023

I am wanting to know whether this is possible in the Modern forms designer. 

 

in the classic forms Designer we had a single line field that would be passed to the google API and it would allow the field to be auto completed with Destinations.

 var autocompleteFrom = new google.maps.places.Autocomplete(
    (document.querySelector('.MileageStart input')),  
    {types: ['geocode']});

since the in the modern forms designer all values are accessed through the LFForms interface is there a way to get the actual element and not just the values.  I have Tried this but receive an error

  var field= LFForm.findFieldsByClassName('MileageStart');
  var autocompleteFrom = new google.maps.places.Autocomplete(
    (field[0]),  
    {types: ['geocode']});

any help would be appreciated 

1 0

Answer

APPROVED ANSWER
replied on September 11, 2023

The modern designer places custom javascript in a sandbox (iframe) so it cannot interact directly with page elements to attach events or manipulate the dom directly.

However, if it is a single line field you might be able to do something with the "autoCompleteValues" property of the LFForm object using the "changeFieldSettings" function.

The LFForm Object (laserfiche.com)

1 0

Replies

replied on October 16, 2023

Has anyone had any success with this yet (getting the Google API to work with the modern designer)?  I feel like this is a step backwards in functionality from the classic forms.

0 0
replied on November 20, 2023

I've previously used the Classic Forms Designer in conjunction with the Google API to auto-populate addresses and calculate mileage.  Has anyone heard from Laserfiche on this, as to whether this will be fixed on an upcoming version or if we are forever to be stuck using the Classic Forms Designer?

0 0
replied on November 20, 2023

I'm not sure "fixed" is the correct wording. It's not broken. The Modern designer is a new designer. With that said Laserfiche has mentioned that they are looking into ways to accomplish these types of things in a future release.

2 0
replied on November 20, 2023 Show version history

You are correct, we'll use "enhanced" since it has never been a function previously in this new designer.  I said fixed as I am a firm believer when releasing a replacement for an existing application, the new application at minimum should provide the same functionality as the old one.  Otherwise it creates the confusion we've repeatedly had with the new designer where the customer ends up finding the missing functionality. 

Don't get me wrong, I love the new designer, as it makes it so much easier for end-users/customers to build solutions.  My hope is to get a firm release date from Laserfiche on when this much needed Google API functionality will be available in the new designer.  I'd also love Laserfiche to take a proactive approach and maintain a page that advises the specific functionality that is available in the old designer that is not available in the latest release of the new, along with a roadmap for when it will be available.   This would allow end-users to know which to use before they get start building a new process.

0 0
replied on November 20, 2023

Laserfiche has been very upfront about the new designer lacking features of the Classic Designer. When you go to add a new form to a process there is a link to a comparison chart (Forms Designer Comparison (laserfiche.com)). I'm not sure how up to date it is. It also does not have a roadmap and it has been Laserfiche's stance previously to not release those types of things.

1 0
replied on November 20, 2023

You are my hero!  I had not been able to track down this comparison between the two.  While it doesn't contain this specific enhancement, it does show the major differences.  Thanks a TON for sharing that link!

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

Sign in to reply to this post.