The pages section of the Knack builder is where you add visual elements to work with your records. These may include forms, lists, tables, searches, and calendars.
Views and Pages
There are two main visual components of your app: views and pages.
A view is a visual element that works with records in your database. These include:
Forms to add and update records
Tables, lists, maps, and calendars to display multiple records
Searches to find specific records
Details to view a specific record
Reports to view summaries and calculations of multiple records
Menus to link to other pages
RichText to display static content in your interface, like images and rich text
Views are collected onto pages. Your users will begin on a start page and can navigate to other pages with links and menus. Each page can have one or more views.
Your interface begins with an empty start page. This is the first thing your users will see. Add your first view by selecting the view type from the top bar.
When you add a view, you'll pick a view type from the top bar, then you’ll select which object that view will work with:
For example, if you added a table to display the records for the "Companies" object, you can add any of the fields in that object as columns to the table.
Once added, you can click on a view to edit different format options:
When editing a view, you can customize which fields the view uses and other format options. Here's what it looks like to edit the table:
Click here for more on views.
Your app starts with a single "Home" page. You can add as many additional pages as you need by clicking the "+ ADD" button in the left column:
Once you click to add a page, you'll be guided to select which views to display on that new page.
Menus and Links
Menus and links are used to navigate between different pages in your app. Understanding how menus and links work is important for building a complex app of more than one page.
Here are some examples from the Contact Directory example app:
At the top is a page menu. This is a special menu that will display a link to each parent page, like your "Home" page. You can control options for this menu by clicking the "Settings" icon link in the very top menu of your builder, then selecting the "Layout & Colors" tab.
Directly above the table is a link to "Add Company." This is a menu view linking to a child page. On that page is a form to add a new company record.
In the table itself is a link to "View." Each of these links goes to a child page that displays more details about a specific company record. This is useful if you don't want to show every field as a table column, or show records connected to the company (see below).
Showing Connected Records
With Knack, you can easily connect records. For example, you can set up your database so each Contact record is connected to a Company record.
Once you’ve connected your records, you can easily display them in your pages and views. For example, you may want to show all the Contacts connected to a specific Company.
Just click to add a view on any details or edit page and Knack will present you with options to show the connected records:
Knack knows that Contacts are connected to Companies, so you have the option of displaying those connected records with a view.
Adding User Logins
If you have User Authentication enabled, you can add logins to your app. This means a user must log in before they can access any page:
Click here for more on user authentication and adding logins.