In Knack, adding a multiple choice or connection field to your object is a great way to categorize or connect your data. Users can choose from a dropdown menu of options on a form and associate the record with a category or connected record in another object.
Consider the following example:
Multiple choice and connection fields make it possible for you to offer several options to the user. However, in some cases, the correct response is not always available. How can users add another option without needing to access the builder?
Well, it just so happens we have a solution for allowing users, in the live app, to add new options from within the form!
If this your first time creating an app, you'll need to know some basics about adding objects, fields, pages, and views. You can start by watching our "Introducing Knack" video tour and then working through the articles in our Builder Basics section. Other good resources can be found in our designing the database and building pages sections of the knowledge base.
Select the Page with the Form
In the Pages section of the builder, select the page where your form is located.
Open the Form's Settings
Click on the gear icon to open up the form's settings:
Open Edit Input
Find the field you want to enable the feature on and hover your cursor over it. Click the pencil icon to open up the field's edit input settings.
In the screenshot below, you can enable this feature on both multiple choice fields and connection fields.
Check the Custom Options Box
Next to Custom Options, check the box to allow users to add new options.
Enabling this feature on a multiple choice field will add a new option.
Enabling this feature on a connection field will add a new record in the connected object.
View it in the Live Form
Once enabled, app users can now add new options by clicking on the “Add new option link”.
When a user clicks on the “Add a new option” link, a modal popup of the form will open. The user can complete the form, click submit and see their new option populated as the selected field value.
Example: Multiple Choice Field
Adding a new multiple choice field option will open up a lightbox with a field to add a new option.
Success! The new option has been added.
Example: Connection Field
Adding a new connected option will open up a child form to add a new record.
Success! The new campaign has been added.