Getting js error in form-field liferay 7.1

thumbnail
Abhishek Jain, modified 7 Years ago. Regular Member Posts: 226 Join Date: 8/20/16 Recent Posts

I am getting a js error that renderer is not a constructor on adding custom form field in liferay 7.1....any idea on how to resolve this. Please help ... any help would be appreciated...thanks in advance.

Arnab De, modified 7 Years ago. New Member Posts: 21 Join Date: 10/15/14 Recent Posts

Kindly share ur js file. you can also add some console.log to debug the issue

thumbnail
Abhishek Jain, modified 7 Years ago. Regular Member Posts: 226 Join Date: 8/20/16 Recent Posts

I found that the code causing error is below:-

getTemplate: function() {
                        var instance = this;

                        var renderer = AObject.getValue(window, ['DDMCheckboxMultiple1', 'render']);
                        //alert(Liferay.namespace('DDM.Field'));
                        var container = document.createDocumentFragment();

                        new renderer(instance.getTemplateContext(), container);

                        return container.firstChild.outerHTML;
                    },

Please help..thanks in advance..