Creating sub-forms using Smart Form Maker
Create Master-Details forms from your MySQL Database :
The newest version of Smart Form Maker creates forms in Master/Detail views (sub-forms) from your MySQL database. This new feature allows you to create relationships and analyze the details of a particular record in a simple, fast and with ease.
In this tutorial, we will show you how to create a simple Master/Detail form using Smart Form Maker. Lets assume you have a database with two related tables :
- “customers” : For saving the contact information of each customer. It has a primary key column with the name “Customer_ID”
- “Orders” : For saving the orders data.
You want to create an orders per customer form where you can manage the contact information of each customer and a list of his orders using just one form!
in this example the “Master” form should be for the customer’s contact information and the “Details” should be for listing the list of orders of the customer loaded in the “Master” form .
The process of creating sub-forms goes in a few simple steps :
1) Start by creating your master form (the customers form in our example) , the data source of this form will be the “Customers” table.
2) in the “Form type” step please select “Master/details” form.
3) Once selecting the “Master/details” form type a new window should appear, using this window you need to define :
- The data source table of the detailed view (The orders table in our example)
- The joining column (The “customer_ID” column in our example)
3) Customize the detailed view by selecting its columns, labels, validation rules, etc
4)Your form should be something like the following image