I have 2 forms in iframes without the embedded code on our company site that are no longer loading since upgrading to Forms 10. They worked before. The reason we don't use the embed code is because we can't use JavaScript on our site in these areas.
Question
Question
Answers
We're able to recreate the issue when the Forms server and the web server hosting the page with the iframe are different machines.
As a workaround, please first backup the forms.js file (by default located in C:\Program Files\Laserfiche\Laserfiche Forms\Forms\js\form) and then modify the file by changing
$('button[value="__SaveDraft"]').removeAttr('name');var isInIframe=(window.location!=window.parent.location&&window.parent.location.pathname.indexOf("design/scripts")>-1)?true:false;if(isInIframe&&typeof isPreviewMode!='undefined'&&isPreviewMode==true){var submitBtn=$('.action-btn.Submit');if(submitBtn.length!=0){submitBtn.prop('disabled',true);}}
to
$('button[value="__SaveDraft"]').removeAttr('name');try{var isInIframe=(window.location!=window.parent.location&&window.parent.location.pathname.indexOf("design/scripts")>-1)?true:false;if(isInIframe&&typeof isPreviewMode!='undefined'&&isPreviewMode==true){var submitBtn=$('.action-btn.Submit');if(submitBtn.length!=0){submitBtn.prop('disabled',true);}}}catch(err){}
This will be fixed in the next release of Forms.
This issue is addressed in Laserfiche Forms 10 Update 1
Replies
I am also seeing this same issue even when I attempt to use the embedded code. I have many forms that are embedded into our company Sharepoint site either by using a page viewer web part (iFrame) or simply embedding the code. Has anyone had any success in resolving this?
I'm having an issue as well. Chrome is reporting the following error:
Uncaught SecurityError: Blocked a frame with origin "https://lfdev.ourdomain.net" from accessing a frame with origin "https://intranet.ourdomain.net". Protocols, domains, and ports must match.
Iframe worked before the upgrade to Forms 10. Both of our servers use the same wildcard certificate.
I wasn't able to recreate the issue using a generic form and html page
<!DOCTYPE html> <html> <head> <title>Form in iframe</title> </head> <body> <h1>Test</h1> <iframe width="1000" height="500" src="http://MyServer/Forms/swjQf"></iframe> </body> </html>
Can you provide additional details regarding your setup? Also, if you perform a similar test as the one above, is there still an issue?
Regards
Hello Alexander,
I inserted your html from above into an embed code web part in Sharepoint 2013 and see the following. If I plug in a generic address such as espn.com, the page displays fine. However, once I plug in the url of any form, I only get a blank white page. This did work perfectly before performing the upgrade. Checking the event viewer logs, there are no errors in the application, system, LFForms, or web server events that would indicate a problem.
Thank you Alexander, everything works perfectly now!
This issue is addressed in Forms 10.1.
Thank you.