Formy

A simple approach to creating HTML forms with BOOTSTRAP

Source

var fm = [
     { label: "<h3>Enter Your Details Here</h3>",type:"titlebox", attrs:{"class":"text-center"}},
	 { label: "Name", name: "name" },
	 { label: "Title", name: "title", type:"select", options:["Mr", "Mrs", "Miss", "Master", "Chief", "Dr"] },	 
	 { label: "Division", name: "division", type:"select", options:[
		 {text:"Unspecified",name:null},
		 {text:"Army",name:1},
		 {text:"Navy",name:2},
		 {text:"Airforce",name:3},
		] },	 
	 { label: "Password", name: "pwd", type:"password"},
     { label: "Upload CV", name: "upload", type:"file"},
     { label: "Period", name: "start,end", type:"daterange"},
     { label: "Submit", name: "submit", type:"button"}
	];
     $("#formarea").formy("createForm", fm, { type: "horizontal", colratio: "1:3" });