Prepare for success
Enhancing your form
You may have noticed that the travel request form created in the first article does not contain an area for destinations. This is where a repeating section comes in handy.
The first step is to create some room on the form. To resize a control on the form, select it and drag its yellow corners. To move a control, select it and drag the whole control.
Your form should look something like this.
In the space you have created, drag a Repeating Section Control onto the canvas.
Add four Label controls
The next step is to add four Label controls above the repeating section to serve as column headings. Title the four label controls as follows: Country, City, Arrival Date, and Departure Date.
To change the title of a Label control, double click on the control and type in the text box.
Once you have named all your Label controls, your form should look something like this.
Add two text controls within the repeating section
Now it’s time to add the two text input controls within the actual Repeating Section control. Drag a Single line of text control onto the canvas and set it inside the repeating section control below the “Country” Label control.
Now copy and paste this control below the next column, City. Your form should look similar to the image below.
We’re almost finished with the repeating section!
Add two Date and Time controls
The final two controls are Date/Time. Drag a Date and Time control inside the repeating section control, below the "Arrival Date" Label control. Double-click the control. In the Date Only field, select Yes.
Copy this Date/Time control and paste it below the "Departure Date" Label control. Your form should look something like this. You may have to rearrange the controls so everything fits.
Format the controls
Add formatting to the repeating section to make the input controls consistent with other controls on the form. Click the Start Date input control and then select Format Painter in the ribbon. The Format painter copies the formatting style from the selected control.
Click the Repeating Section control to paste the copied formatting style.
Drag and drop a Label control above the existing four Label controls lining the top of the repeating section. Double-click the control and name it Destinations.
Finally, double-click the Repeating Section control. In the control dialog, locate the Text for add row icon and type in “Add another destination”.
Validation & hyperlinks
One of the requirements to submit a travel request is to read and understand the Corporate Travel Guidelines. Here you'll add a checkbox at the end of the form for users to select when they've read the guidelines. You'll also add some validation around this control to only allow form submission if the user has selected the checkbox.
Add a Yes/No control and Label control onto the form
Drag a Yes/No control onto the form, below the Repeating Section control.
Next, drag a Label control onto the form next to the Yes/No control. Double-click the Label control. Type “I have read and accept the..”.
Now you can add a hyperlink to the Corporate Travel Guidelines document. Click the Insert tab and then click Link.
At the bottom of the Insert Reference dialog is a section for a web address. In the Address field, enter the URL where the document can be accessed from.
Note: If you do not have a document to link to, try any hyperlink such as www.nintex.com or www.google.com.
In the Hyperlink text to display, type “Corporate Travel Guidelines”. Click OK.
Click the General tab and then Save the control.
Configure the Yes/No control
The next step is to set the validation of the Yes/No control. Double-click the Yes/No control to open the configuration menu.
In the Text field, type “Yes”. Then expand the Validation section and in the Required to be checked drop down menu, select Yes.
In the Required to be checked field, type “You must read and accept the travel guidelines”. Click Save.
Preview your form
Once you’re happy with the layout of the form, click the Preview button in the ribbon. Your form will look something like this. If you try to submit the form without checking the box, the form will not submit.
Check for success
- Were you able to add a Repeating Section control to your form design?
- Were you able to add validation to your form design?
- Does your validation behave as expected?