The application code
Now, we have covered all the necessary form methods to create the application form. We are now going to add the form creation method to the app.js
that contains the form initialization, events, flags, and validations.
app.js
Open the app.js
file and add the following code at the end:
// Form var appForm; dhtmlxEvent(window,"load", function(){ // create form appForm = appPopup.attachForm([ // settings { type: "settings", position: "label-left", labelWidth: 130, inputWidth: 120 }, // id { type: "hidden", name: "id" }, // firstName { type: "input", name: "firstName", required: true, label: "First Name:" }, // middleInitial { type: "input", name: "middleInitial", label: "Middle Initial:", inputWidth: 50 }, // lastName { type: "input", name: "lastName", required: true, label: "Last Name:" }, //...