Add Form form
Our next step is to add a form to the page, and the selected field in the table will be displayed in the form. Provides a submit button to make changes to the displayed data submission.
Add a form to a layout cell
1. Add a form using Attachform () in the layout on the right
"index.html" Filecontactform = Layout.cells ("b"). Attachform ();
2. Add an XML file to the Data folder Form.xml
3. Open and add the following code:
<?XML version= "1.0"?><Items> <Itemtype= "Settings"Inputwidth= "The "position= "Label-left"Labelwidth= "The "/> <Itemtype= "Label"label= "Name"/> <Itemtype= "Input"label= "First Name"name= "FName"offsetleft= " the"/> <Itemtype= "Input"label= "Last Name"name= "LName"offsetleft= " the"/> <Itemtype= "Label"label= "Internet"/> <Itemtype= "Input"label= "Email"name= "Email"offsetleft= " the"/> <Itemtype= "button"value= "Submit"OffsetTop= " the"offsetleft= "+"/></Items>
The Name property is loaded from the database. form fields can be accessed through the Name property of the API
4. Use the Loadstruct () method to load the XML data into the form
"index.html" Filecontactform = Layout.cells ("b"). Attachform (); Contactform.loadstruct ("Data/form.xml");
DHTMLX Front-end framework build one of your application Tutorials (eight)--Add Form form