License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.


In line 5 and 6, change the source and target form grid field IDs accordingly.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

Code
<p><a class="copy btn">Copy Grid 1 to Grid 2</a></p>
<script>
$(function(){
    $(".copy").on("click", function() {
        var grid1 = FormUtil.getField("field1");
        var grid2 = FormUtil.getField("field2");

        $(grid1).find(".grid-row").each(function(){
            var json = $(this).find("textarea").val();

            //remove id
            var obj = JSON.parse(json);
            if (obj.id !== undefined) {
                delete obj.id;
                json = JSON.stringify(obj);
            }

            $(grid2).enterpriseformgrid("addRow", {result: json });
        });
    });
});
</script>

You may refer to the attached sample app below.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.


APP_gridcopy-1-20181031190701.jwa

Related Elements

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.


  • No labels