formRender() on a single form renders all forms.
See original GitHub issueI don’t understand why both forms are being rendered in this example? I was expecting only form1
to be rendered. Can this be done on a page with multiple forms?
<body>
<section id="section1">
</section>
<section id="section2">
</section>
</body>
$(function() {
var form1 = $('<textarea/>').attr('id', 'form1').appendTo($('#section1'))
var form2 = $('<textarea/>').attr('id', 'form2').appendTo($('#section2'))
var formData = '<form-template><fields><field class="form-control" label="Full Name" name="text-input-1459436848806" type="text" subtype="text"></field><field class="form-control" label="Select" name="select-1459436851691" type="select"><option value="option-1">Option 1</option><option value="option-2">Option 2</option></field><field class="form-control" label="Your Message" name="textarea-1459436854560" type="textarea"></field></fields></form-template>'
$(formData).appendTo(form1)
$(formData).appendTo(form2)
$(form1).formRender()
});
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Form Render Elements | Form API
Form render elements are a subset of render elements, representing elements for HTML forms, which can be referenced in form arrays.
Read more >Form Renderer - Form.io Documentation
Most form platforms render forms on the Server (using technologies like PHP, .NET, Java, etc) and then send the rendered Form HTML up...
Read more >React Final Form re-renders all fields while changing one ...
So, if I'd have several Fields, all of them will be re-rendered, while changing only one of them. Are there any ways to...
Read more >The form rendering API
Django's form widgets are rendered using Django's template engines system. ... or by using the renderer argument of Form.render() , or Widget.render() ....
Read more >How to Customize Form Rendering
If you need to customize all your forms in the same way, create instead a form ... A single call to the form()...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These are great finds I plan to address today. I was able to replicate everything but haven’t had a chance to get in the code to make the fix.
There is a work around for the original issue though that I’ll post but for sure the selector issue needs to be addressed.
Hello Kalvin, How can I reinitialize the Formbuilder without reloading the page