The UBCMS supports simple forms. Try Formstack for better storage and many advanced features.
Last reviewed: April 24, 2024
The UBCMS is not an appropriate place to receive, store or share ANY regulated private data, including credit/debit card numbers, government-issued ID numbers, health information or computer passwords.
We discourage building forms in shared content -- this practice may interfere with normal functionality, including validation.
By combining these built-in form components, you can create a wide variety of forms to meet most basic needs, but we primarily recommend their use for generating simple email messages (contact and feedback forms or quick registration or service requests). For more complex or critical needs (including storing responses), please consider a more robust platform such as Formstack.
Forms should be intuitively organized with headings, clearly marked required fields and clear instructions about what information is desired.
Forms must also be usable for people using screen readers or tabbing using a keyboard. This includes providing a clear label for each field.
Much of this functionality is already built into our UBCMS components and Formstack forms, but be careful not to circumvent these settings.
Best practice: For the UBCMS, a meaningful value must be supplied in the title or label for each form component such as the Dropdown List or Text Field.
Do not use the default Other in a dropdown list with the additional text field - both will be labeled the same id. Instead use a separate and clearly labeled "other" text field.
Do not use the built in date picker. Instead provide separate day, month, and year fields.
We have found Formstack (formstack.com) to be a reliable and robust solution for forms that are more complex than the basic UBCMS tools. A reasonably priced local site license will likely meet your needs.
To use a Formstack in the UBCMS, you will first need to build your form in Formstack.com, then embed the code for the form into your UBCMS page using one of these two methods.
Your forms can be styled appropriately for use in the UBCMS using our UB Branded theme.
> Learn more about the UB Branded theme.
Do not use the default Other in a dropdown list with the additional text field - both will be labeled the same id. Instead use a separate and clearly labeled "other" text field.
Do not use the built in date picker. Instead provide separate day, month, and year fields.
Our custom solution to embed a Formstack form into a UBCMS page is the Formstack component.
Using this component, authors only need to paste the default Formstack embed code directly into the Formstack component on their UBCMS page. This code is provided with your form on FormStack.com. Look in the Publish tab, under 'Quick Start' for 'Embed this form on your website (JavaScript)'. Copy that code and paste it into the UBCMS component. No further adjustments are required.
This method of embedding a Formstack form relies on the HTML Snippet.
This approach works well, using the regular embed code option.
This method is required to embed multiple Formstack forms on a page. Use the Formstack component for the first form, then an HTML Snippet for each additional form. (Read more about this Known Issue.)
This method supports prefilling field values. Add these values in both places in the embed code, for the <script> and also the <noscript> URLs. (There are also more advanced ways to pull in user data from our SSO session if the user has logged in already.)
Here is an example of code:
<script type="text/javascript" src="https://abc.formstack.com/forms/js.php/some_form?nojquery=1&Field=value"></script><noscript><a href="https://abc.formstack.com/forms/some_form?Field=value" title="Online Form">Online Form</a></noscript><script type='text/javascript'>if (typeof $ == 'undefined' && jQuery){ $ = jQuery}</script>
We have created a UB theme that will style your form to match the UB brand and UBCMS style.
Look for it in Formstack by opening one form in Build, then click Styles in the upper left of the page to display available themes. If you see 'UB Branded -- use this theme only', select it so it is marked Active. The styling will immediately be applied to your live form.
If you do not see it, or you would like to update your version, a master copy is in Box as a text file (UB login required). > UB-branded CSS style sheet
To appy our master style sheet, open any of your Formstack forms,switch to Build, then click the Style tab in the upper left. In the Themes Library, edit an existing theme and overwrite with the new code, or click Create Theme and paste in the code.
We make our UB-branded theme the default so it is applied automatically to all our own forms.
(Note: you can also transfer a theme to another account. Copy a blank form that has that theme applied to another registered Formstack user -- see Formstack's documentation.)
Formstack fields can have localized custom styling, but we recommend using these extra HTML tags with caution. > read more about using HTML Tags in the labels of your Formstack form
Formstack loads a "referral badge" link back to their own website at the bottom of every form. Turn this off in that form's settings, or by default for all your forms in your profile dropdown, under 'Badges'.
This method of embedding a Formstack form relies on the HTML Snippet and requires using the Embed Form option and the JavaScript Embed Script. Select 'I don't need jQuery' when the embed code is generated otherwise the page could be corrupted.
Add the values you wish to prefill in both places in the embed code, for the <script> and also the <noscript> URLs.
Here is an example of code:
<script type="text/javascript" src="https://abc.formstack.com/forms/js.php/some_form?nojquery=1&Field=value"></script><noscript><a href="https://abc.formstack.com/forms/some_form?Field=value" title="Online Form">Online Form</a></noscript><script type='text/javascript'>if (typeof $ == 'undefined' && jQuery){ $ = jQuery}</script>
We suggest you delete the embed code link back to Formstack. It will look like this example:
<div style="text-align:right; font-size:x-small;"><a href="http://www.formstack.com?utm_source=jsembed&utm_medium=product&utm_campaign=product+branding&fa=h,5469134" title="Powered by Formstack">Powered by Formstack</a></div>
Formstack fields can be set as hidden or read-only (to prevent the user from changing the pre-filled value).
The following instructions should only be attempted by advanced UBCMS users.
The User Info Loader component can be used to automatically pass information from the UBCMS to Formstack.