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

Question

Question

How do you embed the forms inside iframe? How do you insert the embed code in the src attribute of the iframe?

asked on January 14, 2014

The forms does not display if i put the embed code in an iframe src atribute

 

0 0

Answer

APPROVED ANSWER
replied on January 16, 2014 Show version history

There's no need to put the embed code in an iframe, the code will create an iframe when it successfully loads the form. Keep in mind that the form and the parent page both must be within the same domain for embedding to work.

 

You'll also need to ensure that the business process ID (bpid) and Forms Server URL are filled in in your code.

 

The modified embed code is new to Forms 9.1 and doesn't work with Forms 9.0.

1 0
replied on January 16, 2014

Ok. Yes, I have everything in the same domain. Please see my updated code. I plugged in bpid and URL correctly. Why is the onloadCallback not getting fired? I am using Forms v9.0

 

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>

 <body>
     <script type="text/javascript" src='FormsServer/Forms/js/forms-embed.js'></script>
        <script type="text/javascript">
            var lf = new LaserficheForms.Form(null, {
                bpid: 'id', host: 'FormsServer/Forms', params:'First_Name=test',
                onloadCallback: function () {
                    alert('inside onloadCallback');
                }
            });

        </script>
    </body>
</html>

0 0
replied on December 30, 2014 Show version history

Just noticed this question as I was searching the topic. 

 

Priya, 

 

I'm not entirely sure what you mean it's not displaying correctly in an iframe. For Forms 9.0, you may have to use an iframe instead of the <script> tag. Try using:

<iframe id="myframe" src="http://formUrl" width="100%" height="200px"></iframe>

 

*Note you will have to replace formUrl with the direct link to a new submission of the form you are trying to imbed. IE: http://edmsdev02/Forms/CA-LitigationHold or whatever the url may be.

*This also requires the forms server and the webpage you are putting this in to reside on the same domain.

Adjust the height and width to your needs.

0 0

Replies

replied on January 14, 2014

The below code is not working:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
    <script type='text/javascript' 
    src='FormsURL/forms-embed.js'></script>
</head>
<body>

<iframe scrolling="yes" 
            src="javascript:
            lfembed = new LaserficheForms.Form(null /*element to place form in*/,{bpid: 'id', host:'FormsURL/Forms'}).getFrm();"></iframe>

</body>

</html>

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

Sign in to reply to this post.