In WordPress you put the submit form and the catalog on ordinary Pages, then optionally add those pages to a menu.
Visitors who are not logged in cannot submit the form until you allow it. Open the SubmitAppointments layout (Custom Tables → Layouts), click the Permissions tab, add Guest to Who may add records, and click Save Layout. If nothing is selected there, only Administrators can add records, and a logged-out visitor sees “Not authorized”.

New submissions are Published by default (the Default Publish Status setting on the layout’s Parameters tab), so they show in the catalog right away.

Optional: to review submissions before they appear, set Default Publish Status to Unpublished. New records then arrive as drafts, and the catalog (which shows published records only) lists them after you publish them.
CustomTables Block (recommended) #
In the WordPress admin menu go to Pages → Add Page.

Title the page Submit Appointment. Click the Block Inserter (the + control), search for CustomTables, and insert CustomTables Block.

In the block sidebar, set:
- Type: Edit Form
- Table: appointments
- Edit Form Layout: SubmitAppointments
Then click Publish.


Create a second page titled List of Appointments. Insert CustomTables Block again and set:
- Type: Catalog
- Table: appointments
- Catalog Layout: List_of_Appointments (WordPress saved the layout name from Step 04 with underscores)
- Edit Form Layout: SubmitAppointments (so the catalog’s Add button can open the form)
The catalog type also offers Filter, Sorting, Limit, and Details View Layout. Leave those empty unless you need them. Then click Publish.


Shortcode alternative #
You can place a Shortcode block on a page instead of CustomTables Block. The plugin documents the syntax in two places.
On Custom Tables → Tables → appointments → Records, under Adding Catalog Views and Edit Forms:
[customtables table="appointments"]
[customtables table="33"]
[customtables table="appointments" view="catalog"]
[customtables table="appointments" view="edit"]
[customtables table="appointments" view="catalog" limit="5"] view="edit" is the submit form. view="catalog" (or omitting view) is the catalog. limit="0" or omitting limit shows all records.

On the layout editor, under Adding Layout Output, the same shortcode can target a layout by name or ID:
[customtables layout="SubmitAppointments"]
[customtables layout="16"]
[customtables layout="SubmitAppointments" id="1"]
[customtables layout="SubmitAppointments" limit="5"] Use layout="List_of_Appointments" for the catalog. The id attribute opens the edit or details form for that record.

To place a shortcode, add a Shortcode block to a page and paste one of the documented snippets, for example:
[customtables table="appointments" view="edit"]
[customtables layout="SubmitAppointments"] 
Adding the pages to a menu #
To add the pages to a navigation menu, go to Appearance → Menus (not the Site Editor).

On the Menus screen, open Pages, use Most Recent or View All, check Submit Appointment and List of Appointments, click Add to Menu, then save the menu.

Now let’s set up the front-end. We will use Menu Items to create front-end pages.
First, create a new Menu Item, and enter the Menu Title.

Select Menu Item Type. We need Custom Tables – Add/Edit Record (This is the submit Form page)


Go to the “Options” Tab, Select the Table, and Edit Form layout.

Go to the Permissions Tab, set “Guest can add new records” and set “Who may add content” to Public – to let unregistered users submit the form.

Go to the Email Notification Tab and select “Email Message Layout”.
Set “Send Email Under Conditions” to “When a record is added”
To “Send Email When Record is Added To:” type the email address where you want an email to be sent.
Save it.

Leave a Reply
You must be logged in to post a comment.