dobtco / formbuilder

[Needs Maintainer] Formbuilder is a small graphical interface for letting users build their own webforms.
http://dobtco.github.io/formbuilder/
MIT License
1.84k stars 488 forks source link

Sometimes custom field disapears #211

Open kubasienki opened 8 years ago

kubasienki commented 8 years ago

We cannot find any regularities in such behavior. Simply from time to time my custom field disappears from form. here's code: `function() { Formbuilder.registerField('thumb', { order: 15, view: "<% for (i in (rf.get(Formbuilder.options.mappings.OPTIONS) || [])) { %>\n <div style=\"font:normal normal normal 14px/1 FontAwesome;\">\n <% if (i==0){ %> \n <div class=\"fb-thumb-up a<%= i %>\">\n <% } else { %>\n <div class=\"fb-thumb-down a<%= i %>\">\n <% } %>\n <input type='radio' <%= rf.get(Formbuilder.options.mappings.OPTIONS)[i].checked && 'checked' %> onclick=\"javascript: return false;\" style=\"display:none;\"/>\n \n

\n
\n <% } %>", edit: "<%= Formbuilder.templates['edit/size']() %>\n<%= Formbuilder.templates['edit/countable']({ includeOther: false }) %>\n <%= Formbuilder.templates['edit/thumboptions']({ includeOther: false }) %>", addButton: "<span class=\"symbol\"><span class=\"fa fa-circle-o\"> Thumb", defaultAttributes: function(attrs) { attrs.field_options.options = [ { label: "", checked: false }, { label: "", checked: false } ]; attrs.field_options.size = 'S'; return attrs; } });

}).call(this);`