v1.16.0 – JSON Support

Without a doubt the most requested feature for jQuery formBuilder has been JSON support and it finally arrives in v1.16.0.

Breaking Changes

In previous versions a <textarea> element was required to insert formBuilder where it was needed on a page- this is no longer supported. There are numerous reasons for the removal but among the top 3 are :

  1. It’s slow. In addition to saving data internally, formBuilder continued to write that same data to the <textarea> for legacy support.
  2. The <textarea> needed to be manipulated on re-render and forced developers to add an arbitrary tag to their html for the sake of formBuilder
  3. It’s just bad practice

The removal of <textarea> means formBuilder is now initialized on the containing element or more specifically, the element that will hold the builder. Example:

$('.build-wrap').formBuilder();

Previously formData could be saved directly from textarea.value or $(textarea).val()– no more. FormBuilder’s formData is now located in data('formBuilder').formData on the jQuery object formBuilder is initialized on.

Added

  • A now functional dataType option: details
  • Like formRender, formBuilder now has formData option: details
  • utils.js for shared utilities like hyphenCase(), camelCase() and markup()

2 thoughts on “v1.16.0 – JSON Support

  1. I want to use this as a dynamic profile generator by an administrator. I’m using Codeigniter.

    The part that i cannot figure is how i save the json data and then display it with the form-render.

Comments are closed.