Showing orbeon form inside page

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Showing orbeon form inside page

Michał
I have a page layout with menu and footer. I would like to put orbeon forms inside the page in e.g. div element.

I tried to do it with iFrame, but I am dissatisfied with result. I have a problem with scrollbars (even after trying solution from http://orbeon-forms-ops-users.24843.n4.nabble.com/iframe-in-xforms-td39964.html). There is also resize issue when using xforms:repeat in xform.

What is the best way to put form inside a page? Is there another solution then using iFrame?
Reply | Threaded
Open this post in threaded view
|

Re: Showing orbeon form inside page

klemm


Take a look at http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties/configuration-properties-xforms#TOC-Ajax-portlet

We use jQuery load(http://api.jquery.com/load/) as we feel this is more light weight than Dojo.

(function($) {

    var initOrbeon = function() {
        if (typeof ORBEON != "undefined") {
            if (!document.all) {
                ORBEON.xforms.Init.document();
            }
        }
    };

    $.fn.loadOrbeonForm = function(formUrl) {
        this.load(formUrl + '?orbeon-embeddable=true', initOrbeon);
    };
})(jQuery);
Reply | Threaded
Open this post in threaded view
|

Re: Showing orbeon form inside page

Michał
This post was updated on .
Thank you for your answer. I will check if it will work for us.
Reply | Threaded
Open this post in threaded view
|

Re: Showing orbeon form inside page

Michał
Your answer works (I'm using solution with jQuery) :). However I have problem with alerts and hints. Both are shown as yellow rectangle in the page I am loading (and it works there). After loading to second page they don't work (I get js error "elementRegion.contains is not a function"). Do you have any idea why?