Easily Convert Javascript Objects To HTML Forms | object2form

Object2form easily converts your javascript object into a complete HTML form with all the great modular code your framework or UI library requires.

convert object to formdata javascript, formdata to json, formdata append object json, convert form data to json online, convert object to formdata angular

Currently we support the following frameworks/libraries:

  • Angular (>2) with Bootstrap 4
  • Angular (>2) with Bootstrap 3
  • Angular (>2) with Angular Material
  • Angular (>2) with Semantic UI

How to make use of it:

Usage

<form (ngSubmit)="onSubmit(f)" #f="ngForm">

  <div class="form-group">
    <label for="name">name</label>
    <input type="text" class="form-control" id="name"
       ngModel name="name" #name="ngModel" required
       [ngClass]="{'is-invalid': name.invalid && name.touched}">
    <div class="invalid-feedback">Invalid value</div>
  </div>

  <div class="form-check">
    <label class="form-check-label">
      <input type="checkbox" class="form-check-input" id="registered"
       ngModel name="registered" #registered="ngModel">
      registered
    </label>
  </div>

  <div class="form-group">
    <label for="age">age</label>
    <input type="text" class="form-control" id="age"
       ngModel name="age" #age="ngModel" required
       [ngClass]="{'is-invalid': age.invalid && age.touched}">
    <div class="invalid-feedback">Invalid value</div>
  </div>
  
  <button type="submit" class="btn btn-primary">Submit</button>
</form>

convert js object to form data, Object2form Plugin/Github, typescript convert object to formdata, convert object to formdata react, object to formdata npm


See Demo And Download

Official Website(IdanCo): Click Here

This superior jQuery/javascript plugin is developed by IdanCo. For extra advanced usage, please go to the official website.

Related Posts

Input-Values-Using-Mouse-Drag

Create Side Sliders Input Values Using Mouse Drag | Pointer Lock

HTML Range Slider is a lightweight library to create side sliders to adjust values easily and precisely by making use of the Pointer Lock API. Side Slider…

simple-parallax-scrolling-js

Smooth and Lightweight Parallax Scroll Library in Pure Javascript

Lightweight and seamless parallax scrolling library implemented in pure javascript using hardware acceleration for additional performance. Main Features Extremely lightweight with no dependencies A few kilobytes of pure…

Convert-Form-Data-to-JSON

How to Convert Form Data to JSON with HTML Forms | FormsJS

FormsJS is a simple-to-use JavaScript library that covers type subject values to JSON in real time. The items containing the data category will be analyzed automatically. It…

editable-html-table-using-javascript

A Small jQuery Extension to Convert An Editable HTML Table

Editable Table is a small jQuery extension to convert an editable HTML table for fast data entry and validation. A small jQuery extension to convert a static…

jquery.youtube-background

Simple jQuery Plugin for Embedding YouTube Videos As Cover Background

jquery.youtube-background is a jQuery plugin built to facilitate YouTube embeds as cover wallpaper using the YouTube Embed API. There is another jQuery Youtube Video Background plugin that…

Data-Table-Generator-Tabulator

Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…