Skip to content

Latest commit

 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

formbuilder

Generate Form Creation Drag and Drop With Javascript Demo

How to use

buildform([FORM ID], [JSON DATA], [LANG]);

Example

<form id="formbuilder" method="post" action=""></form>
<script>
const form = {
                "title" : "Judul Formulir",
                "description" : "Deskripsi Formulir",
                "form" : [
                            {
                              "type" : "text",
                              "question" : "Nama",
                              "description" : "Isi dengan nama lengkap",
                              "required" : true,
                              "data":[]
                            },
                            {
                              "type" : "select",
                              "question" : "Kelamin",
                              "description" : "",
                              "required" : true,
                              "data" : [
                                          "Laki - laki",
                                          "Perempuan"
                                      ]
                            }
                          ]
              };

buildform("formbuilder", form, "id");
</script>

Add form

let formjson = {
                  "type" : "text",
                  "question" : "Telepon",
                  "description" : "Isi dengan nomor telepon",
                  "required" : false,
                  "data":[]
                },
  
formbuilder_add("formbuilder", formjson, "id");

About

Generate Form With Javascript

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages