I'm using the embed code example found here (obviously, swapping out the generic values for my site-specific details):
<script type="text/javascript" src='FormsServerURL/Forms/js/forms-embed.js?v=9.2'></script>
<script type="text/javascript">
var title = document.getElementById('title').innerHTML;
var lf = new LaserficheForms.Form(document.getElementById('myform'), {
bpid: 'ID', host: 'FormsServerURL/Forms', params: 'Topic_Name=' + title,
onloadCallback: function () {
var s = lf.getFrmDocument().getElementsByName('action');
if (s.length > 0) {
s[0].onclick = function () {
document.getElementById('myform').style.display = 'none';
};
}
}
});
</script>;
But when I load the page I get the following javascript errors
- IE 11
Object doesn't support property or method 'getFrmDocument' - Chrome
Uncaught TypeError: lf.getFrmDocument is not a function - Firefox
TypeError: lf.getFrmDocument is not a function
These errors point to the var s = lf.getFrmDocument().getElementsByName('action'); line.
What is the updated method name that allows for grabbing the action button in Laserfiche forms?