DHTMLX Front-end framework build one of your application Tutorials (eight)--Add Form form

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.