I'm looking to integrate a form builder into a site I'm using, but I'm hoping to find a library that has some or most of the functionality I'm looking for.
I'm looking for a library that will give me a nice GUI for building the form, and a JSON (or XML, or similar) output that I can play with in the django
backend. I'm planning to use django
to output the finished form.
I tried running this through Google, but that only yields companies who make a business out of creating and hosting the forms online. But nothing in the form of a library.
Any suggestions?
Approach 1: Use document. createElement() to create the new elements and use setAttribute() method to set the attributes of elements. Append these elements to the <form> element by appendChild() method. Finally append the <form> element to the <body> element of the document.
Step 1: Choose the fields you'd like to add from the panel on the left, and drag them over to your form. If you want to save time, start with a pre-built template. Step 2: Visit the Style tab in the builder to add custom colors, fonts, and images to your form—or choose from our pre-built themes.
Upon clicking the submit input element, the browser makes a POST request to the /contact URL on the same origin (protocol, domain and port). Using JavaScript we can intercept this event, submit the form asynchronously (with XHR and Fetch), and we can also react to events happening on individual form elements.
I have the same requirement,
I will update this answer over time but bootstrap form builder ( PHP ) seems nice
https://github.com/minikomi/Bootstrap-Form-Builder demo : http://minikomi.github.io/Bootstrap-Form-Builder/
If you dont mind spending a bit of cash you can look at:
Machforms : http://www.appnitro.com/
The form builder itself is entirely client side JS, so you would just need to post the output (which is JSON) to django instead of their php script.
A new JS library that's just popped up might be what you are looking for: http://dobtco.github.io/formbuilder/
Project page: https://github.com/dobtco/formbuilder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With