Knack uses objects and fields to structure your data.
Fields are used to define specific attributes of an object. Think of a field like a spreadsheet column. You'll want to add a field for each attribute you want to store for your object.
You access your fields by selecting the data tab at the top of the builder’s left-hand menu, and then selecting one of your objects from that menu. The fields for that object are listed on the right, in the main section of the builder:
Add a field by hovering your mouse over a field a field Category (e.g. Text, Number, etc.) and selecting a field type:
First give your field a name. Keep in mind these names will be used in your live application, so we recommend keeping them reader-friendly.
Field types are grouped like so:
Text: Short Text, Paragraph Text, Rich Text, Text Formula
Number: Numbers, Equations, and Formulas
Choice: Multiple Choice and Yes/No
Date: Date/Time and Timer
File: Files of any type, Images
Personal: Contact information: Name, Email, Address, Phone, Signature
Other: Link, Rating, Auto-Increment
Click here for more on the different field types.
Click directly on a field in the builder to edit its settings:
This will bring you to the field options.
Changing the Field Type
Note that changing the field type has the potential to update any existing records using that field, as Knack will attempt to convert any existing data when possible.
For example, if you change a field’s type from from short text to link, Knack will use the short text for the URL component of the link field. But if you change a field from paragraph text to a file, Knack has no way to migrate that data, so that field’s data will be cleared for each record.
Different field types have different format options you can control. The following are some common format options:
Required: This field must have a value before a record can be inserted or updated. For example, any form adding a record won't be allowed to submit until this field has a value.
Must be unique: A value for this field will only be accepted if it hasn't already been added to any other record. The new value must be unique.
Default: Any value you enter here will be used as the default value for a new record. It will also populate any forms to add this record. So, instead of the input being blank, it will contain this default value.
Review the formatting options for any specific field type here.
Change the Field Order
Click and drag any field up and down to change the order it will appear in.
Fields can be copied into new or existing objects using an object's copy option. Click here for more information.
Conditional & Validation Rules
Conditional rules are used to set a field’s value based on values for other fields. Read more about conditional rules.
Validation rules are used to prevent bad data input by your users. Read more about validation rules.
When you hover over a field, you can click on the trash can icon to delete the field:
You will be asked to confirm before the field is deleted.
Note: Any deleted field will be removed from the entire application; all data for that field will be deleted, and the field will not longer appear in any of your views.