The Layout is how the parts of the Custom Table are arranged on the rendered HTML page.
In Custom Tables we use Twig Tags that will be replaced with the content from the database or generated by the rendering process. Example: {{ table.title }} – This will be replaced with the current table title – “Appointments”.
Edit Form Layout: #
Let’s move on and create our first Layout.
Click on the [New] button to create a new Layout.
Enter the Layout name “SubmitAppointments”, that will be the unique name of our layout since it will be used as the identifier name to find the Layout.
Select the Type: The kind of page it will be used on. We need a layout for Submit Form page so select “Edit Form” type.
Choose the table for which this layout should be used.
Now you may use “Layout Auto Creator” to generate the layout based on the type and fields your current Custom Table has.
Most of the Tags have their parameters. For example, the {{ html.button(“save&close”) }} has the parameters “type”, “Button Label”, “Custom Redirect Link” Ans “CSS class”.
Simply double-click on a Tag to see what parameters it has.
In the “Custom Redirect Link”, you can add a link to redirect the visitor to the Home Page for example.
When you finish editing the Layout – Save it.
Now we have the Edit Form Layout.
Leave a Reply
You must be logged in to post a comment.