The forms does not display if i put the embed code in an iframe src atribute
The forms does not display if i put the embed code in an iframe src atribute
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.
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>
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.
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>