Your starter Webvanta site comes preconfigured with a contact form. When a site visitor completes this form, you'll receive an email, and the message will be added to the site's database so you can review the message history at any time at the Submissions > Messages page.
Sometimes, however, you want to add fields to that form, or you want a variety of forms for different purposes. You may also want the information entered in a form to create a particular type of database item.
For example, suppose you have a site that lists local restaurants. You want the owner of a new restaurant to be able to submit their information. After you've reviewed their submission, you'd like to be able to instantly add it to the restaurant listings on the site.
To create a custom form, start by creating a custom item type (unless you already have a custom item type for the appropriate information; in the example above, you'll already have a "restaurant" custom item type). See Creating Custom Item Types for details.
Custom forms that can be submitted by site visitors support most, but not all, of the fields that you can include in a custom item type. You can use:
Field types that are NOT fully supported on user forms include:
You can include any of these field types in the custom item, but the corresponding fields will not appear in the user form. This is often still useful, though, because all fields will be in your admin form. For example, you may want to include a category picker for the restaurant item, and when you review the submission, you can assign the category.
In some cases, it is possible to make these field types work by adding some additional code to the form. In particular, see the help forum tips-and-tricks article Using a Related Item in a Custom Form if you want to use related items.
To begin setting up the form, view the custom item types list on the Database > Item Types page, and click the Forms icon to the right of the desired item.
The form list page shows any forms you have already created for this item. You can have as many forms as you need, though usually you'll only have one form per item type. Click New Form to create a new one.
On the New Form page, you specify what page the form goes on and what happens when it is submitted:
admin_contact_emailis used. If you want the admin notification emails for the form to go to one or more other recipients, enter a comma-separated list of email addresses in the email field.
Click the Create button to proceed.
Note: For Custom Item Types that you're using for form submissions, you'll usually want to check the "Private" option in the custom item type definition page to keep form submissions from appearing in site search results.
If you specified a new page to hold the form in the previous step, then your form is already on the new page.
If you specified an existing page, we do not put the code on the page for you automatically. Copy all of the form code from the bottom of the Form Template page and paste it into the page on which you want to display it. Note that for proper operation, you must put this code on the Form Page you specified.
Now you can modify the form as you'd like for layout and styling. You may want to rearrange the fields, add styling, and add explanatory text. You can change anything you want as long as you do not change any of the ID or name attributes, the field types, the submit action, or the hidden field.
When a form is successfully submitted, the Success Page is displayed. Add the desired content to the page that you specified when setting up the form.
If you want to display any of the information from the form on the success page, you can access the submitted item via WebvantaScript, just as you would on an Item Page.
If you specified a new page for the Success Page in the previous step, Webvanta created that page for you automatically, so you can now edit it from your page list.
If you enabled the email options when setting up the form, an email will be sent to the person who submitted the form to acknowledge their submission, and to the site admin or specified notification recipients so they know there is new information to be moderated.
The details of how to customize email notifications are covered in the article Customizing Email Notifications for Form Submissions.
You can moderate your submitted forms either by clicking the link in the admin notification email, or by choosing Submissions > Form Submissions.
Form generated items are set to require moderation when submitted, so they will not appear on any public pages. You can edit the new item as desired, and select the Accept moderation choice if you want the entry to appear publicly.