-
Notifications
You must be signed in to change notification settings - Fork 28
Creating a new FormTemplate
Ryan Wold edited this page Jun 18, 2019
·
6 revisions
In Touchpoints, each Touchpoint
has a Form
. Each Form
is based on a FormTemplate
.
When creating a new Touchpoint, the user selects a Form for the Touchpoint, and when the Touchpoint is created, a Form object is also created for the Touchpoint.
FormTemplate
s are defined in Touchpoints and currently managed in a manual way.
The purpose of this page is to describe what is required to create a new Form Template in Touchpoints. The result being that users will be able to select the Form Template when creating a new Touchpoint to create an editable instance of a Form, based on that Form Template.
Example Form Templates include:
- A11
- Recruiter
- Open-ended
- Open-ended with Contact Information
https://github.com/GSA/touchpoints/tree/master/app/views/components/forms
- shared Form layout - a common view layout that all Forms are displayed within
- Form display page (example)[https://github.com/GSA/touchpoints/blob/master/app/views/components/forms/_a11.html.erb]
- Form edit page (example)[https://github.com/GSA/touchpoints/blob/master/app/views/components/forms/edit/_a11.html.erb]
- conditional validations on a Submission (example)[https://github.com/GSA/touchpoints/blob/master/app/models/submission.rb#L4]