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

Question

Question

LF Forms 9.2 Embed code not using up full screen of the page ?

asked on March 2, 2015 Show version history

What are we missing here, we have a form and pasted its Embed code from the publish page. When the page where it's embded its only maybe 100 px wide and height, why is it not dynamically adjusting to full screen ? Even tried using div tags in html to adjust its height but looks like the height/width is controlled by the js script.

 

Any ideas on how to resolve this issue ?

 

It looks fine on a mobile device but not on a computer, tried IE and firefox. On iphone it looks great.

0 0

Replies

replied on March 4, 2015

Hi Sumeet,

You can try this: 

1. add "autoheight: false" into

new LaserficheForms.Form({...})

example: 

lfembed = new LaserficheForms.Form(null /*element to place form in*/,
{    bpid: 'your_bp_id', 
     host:'your_host_url',
     autoheight: false})

2. add lfembed.style.height = "form_length_in_px" into

<script type="text/javascript">... </script>

example:

<script type="text/javascript">
   lfembed = new LaserficheForms.Form(...).getFrm();
   lfembed.style.height = "800px";
</script>

 

0 0
replied on March 4, 2015

That's great works, but we will be publishing tons for forms and not everyone publishing forms will have this JS know how, so how come it's not working right off the bat ?

Can this be rectified at the source itself ? With this code there are now two "vertical" scroll bars, on mobile device we do not run into that concern. Aesthetically it will not work, so question remains what seems to be the issue at hand are we missing some plugin/some js code needs to be updated on back-end ? Why is it not working right out of the box ?

 

 

0 0
replied on March 16, 2015

Hi, 

I'm assuming this is due to the webpage (which is carrying your embedded form) is not in the same domain as your Forms server.

If this is the case, following these steps may help:

1. go to your server where your Forms in installed

2. go to your Forms installation folder (eg: ...\Laserfiche\Laserfiche Forms\Forms) 

3. put your webpage file(s) under forms folder, it should be like this: 

4. Now you can open your webpage with the embedded form in the url

http://your_Forms_server/Forms/your_html_index_name.html

- In the example given above, the url should be

http://v-my-server-name/Forms/embed_form.html

 

Note 

1. You may want to make sure they're using the same protocol : if your server is using https only, you need to make sure the host and src are in https as well.

2. you need to set 

autoheight: true

in the code to embed your form to auto-adjust your form

 

let me know if you have any questions.

 

- Lifei 

0 0
replied on March 17, 2015 Show version history

Sadly its on same domain, we have domain abc.com its on vm1.abc.com/forms.  Bit confused what you mean embed forms html file ? Our forms server is not installed on webserver we are trying to embed forms on, but they are both on same domain.

0 0
replied on March 17, 2015

Hi, 

It's ok they're using different server (as long as they're sharing the same domain).

Say you have your webserver with the embedded form set to http://example-site/website, and your forms server is http://example-site/forms , it should still be able to work properly with "autoheight: true" in your embed-code.

But it's important to make sure that they're sharing the same domain "example-site" - otherwise there will be some browser security issue to block the information of your embedded form and auto-adjust would fail in that  case.

0 0
replied on March 18, 2015 Show version history

Well that does work :( . We have domain.com/randomwebpage.html (this html is dynamically generated its not static html btw).

 

Our forms server and url for this form is vmxyz.domain.com/forms/formname . if we embed the code and even after adding the autoheight it does not work on domain.com/randomwebpage.html, however on mobile device it works fine but not on browsers on desktops/laptops.

 

If we create an html file on vmxyz.domain.com/forms  and embed the above form, such that url now to browse to is vmxyz.domain.com/forms/randomwebpage.html it works on browser and mobile device. But same html file will not work on

www.domain.com/randomwebpage.html   !!

 

So not sure if its a security or some other concerns that need to be resolved but browser should behave exactly the way it does on mobile devices.

0 0
replied on April 8, 2015

Any resolution ? Or it's just what it is ? Also another issue i noticed is when embedding this code it gets pushed down below the footer, does not matter if its a "simple" plain html with a body/header etc. , where content typically goes in a simple html file (pick any free html design/modify its code and insert the embed code). It always ends up at the very bottom of browse, even if this custom html is inside the forms folder on same server as LF forms.  We do not want to use iframes if LF forms had embed code that worked perfectly, the design of theme is not too flexible either cannot figure out how to add custom links at top or footer of it.

 

0 0
replied on April 13, 2015

Hi Sumeet,

Please open a support case with your reseller and reference this Answers thread. That will allow us to better troubleshoot the matter that you are reporting.

Regards

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

Sign in to reply to this post.