Every form which accepts users input need to store data. In Studio you can store such data in Sheets (Refer Chapter Sheets for more information). To store data you will need to send the data from the form to the sheets which can be done using a special control called as “SUBMIT”. This control is in a form of a button.

Let us see a sample app for applying leave, say Leave Application, to better understand the Submit button and its underlying process. A typical Leave Application may have fields like a text field where an employee can input its ID say Employee ID, date fields to capture start and end date of the leave application, say, Leave Start Date and Resume Date, a drop down to determine if the leave is a half day or a full day leave, a radio button to select the type of leave, say Sick Leave or Casual or Privilege Leave and a text field to capture the Reason for the leave application. Now after adding all these controls, you need to add a Submit button on form through which you can send the data on your sheets. Simply click or drag and drop the Submit control in the Button category and add the Submit button on the form. 

When you select a Submit control in your form, you will be taken to a Submission Configuration wizard where you need to select the desired Sheet to store the form’s data.

On this wizard you can either choose an existing Sheet by selecting it from the Select Table drop down or Create a New Table. In this example we will see how to create a new table and map it to the controls we added on the form. Now click on Create New Table option. You will see a text box to enter Table Name. 

Enter your desired Sheet/Table name (Tips & Tricks - always use meaningful table name in order to associate it with your apps), and click on Create button. This will pre-populate the Select Table drop down on the wizard with the table you just created. 

Now click on Next button where you can select all the pages whose data you want to send when a user clicks on Submit button. Select all the relevant pages and click on the Next button. You need to select at least 1 page to proceed (Tip - make sure you have selected the right page).

After you click next button, the wizard will guide you to map the fields of your page/screen with columns of the sheet. Therefore, this section of the wizard will display the Page Name (here the page name that we have used is Leave Application), it also shows the field name, that is, it will display Unique Name  of all the fields/controls that you have added in your screen/page. Column Name drop down is used to map Controls and a Sheet Column. If you have created a new table, you will always get option to Add New Column, who’s name is displayed in the box next to the drop down. Choose the desired column name you want in the sheet for the corresponding field and click on Finish button.  

On clicking Finish button, this wizard will create a new Sheet with the sheet name that you provided in the Select Table tab and columns in the sheet with the name provided in the Map Columns tab. Post this, a new Submit button will be displayed on the app builder. 

You can verify the table name that you have selected in the Submit button Properties, that is, in the right pane in the Properties section, see the Submit Table field. You can also verify the page name whose data will be stored in the sheet in the field Submit Data From. The schema icon 

below the Submit Table field will open the sheet/table where your data will be stored showing all the columns associated with the app screen.

If you want to change the sheet/table associated with the Submit button, then you can simply click on the pencil icon 

 below the Submit Table field or Sheet icon 

 which will take you the Submit button configuration wizard. 

You can also set whether or not the app should prompt a confirmation before user can submit its data. This can be done by setting the value of property called Confirmation Popup.

If it is set to ON, user will get a popup confirmation once clicked on Submit button.

Once the data is submitted successfully, you can set the success message by configuring Success Callback property. You can set success message in either of the three forms - Popup message, Custom URL, Internal Page. 

The success message will appear in a popup with Title & a message if the Message Type is selected as Popup message. You can also redirect your user to an external URL by selecting Custom Page URL. Or redirect user to any other internal page of the app instead of the current screen by selecting page in Select Page: when message type is Internal Page.

Once the user clicks on Submit button, all the validations (if any) applied on controls are evaluated first and post successful validations, data is submitted to the sheet/table and a workflow (if any) is initiated (Refer Workflow chapter to know more about how to configure a workflow).

Did this answer your question?