Embed a datalist in a form

Confluence User - 14 Oct, 2016

Hi Guy's,

Hope you can help (smile)

I need to embed a datalist in my form, and not have it as a pop-up.

Thanks for the help, much appreciated,

Cheers,

Ernest.

forms

3


15 Oct, 2016
confluenceUser
confluenceUser

Try to use Grid

15 Oct, 2016
confluenceUser
confluenceUser

You can also use a custom html field and embed the datalist as an iframe. there are some good javascript examples on the internet on how to make iframes responsive as well but I found thatthey areoften not necessary with Joget. 

 

In the knowledge base under "Integration" you will also find how to modify the url to the datalist to embed only the list without the rest of the surrounding UI.

 

Hope this helps.

 

Cheers

18 Oct, 2016
confluenceUser
confluenceUser

Hello Pachonick,

you use code this below for show datalist embed in form :

<script>
$(document).ready(function()
    {
        // Set specific variable to represent all iframe tags.
        var iFrames = document.getElementsByTagName('iframe');
 
        // Resize heights.
        function iResize()
        {
            // Iterate through all iframes in the page.
            for (var i = 0, j = iFrames.length; i < j; i++)
            {
                // Set inline style to equal the body height of the iframed content.
                iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight + 'px';
            }
        }
 
        // Check if browser is Safari or Opera.
        if ($.browser.safari || $.browser.opera)
        {
            // Start timer when loaded.
            $('iframe').load(function()
                {
                    setTimeout(iResize, 0);
                }
            );
 
            // Safari and Opera need a kick-start.
            for (var i = 0, j = iFrames.length; i < j; i++)
            {
                var iSource = iFrames[i].src;
                iFrames[i].src = '';
                iFrames[i].src = iSource;
            }
        }
        else
        {
            // For other good browsers.
            $('iframe').load(function()
                {
                    // Set inline style to equal the body height of the iframed content.
                    this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
                }
            );
        }
    }
);
</script>
 
<iframe name='iframe' id="iframe" src="url of your datalist?embed=true" frameborder="0" border="0" cellspacing="0" height="100%" style="border-style: none;width: 100%;"></iframe>

 

Goofd luck

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print