KB User's Guide - Documents Tab - Embed a Basic Form into a KB Document
This document will discuss how to modify and embed a basic form (based on the KB's comment/feedback form) into your KB document.
Note
The form described below has a relatively fixed number of fields to ensure security. For more complex forms, consider embedding a embedding a Qualtrics survey or Google Form.
Important
Forms in the KB should not be used to collect sensitive or restricted data, such as social security numbers or Protected Health Information (PHI). For information on what constitutes sensitive data, please see the UW–Madison Data Classification Policy.
Adding a New Form
-
In the document editor, open the Insert menu, then select Feedback form....
-
In the window that appears, enter the email address you would like form submissions sent to, then click Insert.
-
The form will appear in your document. The default fields are labeled:
- Your Email
- Subject
- Comment
- Number
-
While you cannot add fields, you may edit the labels of the fields as desired by highlighting the existing label and entering new text. Please note that the second field ("Subject") will populate the subject line of the email containing the form submission.
- Note: The "Number" field may only be used to help prevent spam, and the form can only be submitted if this field contains a number between 2000 and 3000. Any changes to this field label should still align with this purpose, e.g. "Spam check".
For example, if you were using the form to request proposals for a conference session, you may wish to change the "Subject" and "Comment" labels to reflect this:
-
If desired, you may add an automatic prefix to the second field. This may be useful to help identify or filter emails you receive from the form submissions, as this text will be included in the Subject line. To do this:
-
Open the Source code tool from the toolbar or from the Tools menu.
-
Find the
input
tag with the ID "kbInPageForm_subject" and enter the desired text in thevalue
attribute, e.g.,value="Conference
Proposal:". -
Click Save to save your changes and return to the rich text editor. You will now see the text you entered pre-populated in the second field.
-
Checking or Updating the Destination Email Address
If you need to check or update the email address used for form submissions:
-
Open the Source code tool from the toolbar or from the Tools menu.
-
Find the
input
tag with the ID "kbInPageForm_to_email" and check or update thevalue
attribute as needed. Please note that the email address should be formatted as "emailaddress_at_domain.edu", where "_at_" replaces the "@" sign. This is to help prevent bots from scraping the email address and sending spam to it.
Using the Published Form
The image below is an example of a document on a live site with an embedded form. If the user fills out the form correctly, including the spam prevention in the last field, clicking Submit will cause the form to be replaced by the message, "Thank you for your input!" indicating that the data was indeed submitted.