Forms & Challenges Tutorial
This tutorial will use the Sites and Forms Frameworks to build a form with validation, spam-prevention, email notification and recording to a Base.
Forms Base
First, we need to set up a Web Form Base to include form questions, help, and validations.
-
Click "Website" on the left.
-
Click the add () button in the Workflow menu
-
Select “Content Type”
-
Click the “Edit Type” button () in the Sidebar
-
Enter a concise Title that will be used as an identifier and show in the CMS, e.g. Tutorial Form
-
Click the Advanced tab
-
In the Extends field, choose “Web Form Base”
-
Click “OK” when prompted to refresh the view
-
-
Several “meta” fields will already be present, and you can now add your own fields using the button in the Workflow menu
-
Common fields include email, name, feedback, etc.
-
It is common to add field validations, such as required fields or email/phone formatting
-
Click the desired field
-
You may need to then click the "Edit Field" button (), on the right
-
-
Switch to the Advanced tab
-
Add or edit any validations you'd like to utilize
-
-
-
Click "Approve" in the Workflow Menu.
Web Form
Next, we need to set up a Web Form to act as the foundation of form questions, help, validations, a challenge, etc.
-
Click "Website" on the left.
-
Click the button in the Workflow menu
-
Select “Web Form” (not including “Base”)
-
Title your form, e.g. My Web Form
-
Choose your created Web Form Base for Form Questions, e.g. Tutorial Form
-
Optionally add a Challenge to help prevent spam
-
Expand the field
-
Click the button in “Challenge”
-
Choose the appropriate Challenge, e.g. “Google reCAPTCHA”
-
You can obtain a Site Key and Secret Key from Google for reCAPTCHA
-
This tutorial was created using Google's V2 "Invisible" CAPTCHA
-
Create a new reCAPTCHA instance
-
Enter a label/title
-
Choose "reCAPTCHA v2"
-
Choose "
-
-
-
Also enter your staging address as staging.<account>.webcomand.com (where <account> is the name of your webCOMAND account, which is in the address bar of your web browser like https://<account>.webcomand.com/)
-
-
-
-
Click "Approve" in the Workflow Menu.
-
Click blue back button.
-
-
Ensure your new challenge is present in the Challenge field
-
You can provide a success message or URL for the user in the Success tab
-
Click the Submissions tab
-
For Submission Folder you can choose the “Website” base, or make a dedicated folder therein
-
You can enter an email address for alerts when a form is successfully submitted
-
These results will always be stored in the Submission Folder, with email used for notifications
-
-
-
Click “Approve” in the Workflow Menu.
-
Click “Web Pages” on the left.
-
Choose your home page.
-
Click the button in “Sections”.
-
Find and choose “Web Form Reference”.
-
In the Content tab, expand the Web Form field and choose your form.
-
Check the “Enable reCAPTCHA” checkbox if you’re using a challenge
-
Click "Approve" in the Workflow Menu.
-
Click the blue back button.
-
You should see your new Web Form Reference and Preview your Web Page.
-
Create a test form submission to verify everything is working.
-
If you enabled reCAPTCHA v2 Invisible, you should see the appropriate icon from Google in the bottom-right.
-
If you entered your email address in the Submissions tab of your form, you'll receive an email notification.
-
- Refresh the tree view on the left and you'll now see "Tutorial Forms" as a collection point for submitted forms.
Conclusion
This tutorial covered the creation of a vary basic form with reCAPTCHA protection. Many fields and validations can be created, as well as advanced pre- and post-processing functionality.