unlcms / project-herbie

Drupal 10 implementation at the University of Nebraska–Lincoln
https://cms.unl.edu
GNU General Public License v2.0
5 stars 6 forks source link

Add and configure webform #9

Closed ericras closed 4 years ago

macburgee1 commented 5 years ago

Because Webform stores forms as config, we should have config_ignore in place before proceeding with adding Webform to the platform.

macburgee1 commented 5 years ago

Blocked by #35

macburgee1 commented 5 years ago

Let's look at using Webform Config Ignore

macburgee1 commented 4 years ago

Given the complexity of Webform, we'll probably need to make multiple iterations of reviews.

Forms

(/admin/structure/webform/config)

Third Party Settings

Elements

(/admin/structure/webform/config/elements)

Element General Settings

HTML Editor Settings

File Upload Settings

Element Types

In general, the number of elements available is overwhelming.

Element Formats

Let's revisit once the allowed elements list is finalized.

Options

(/admin/structure/webform/config/options/manage)

These default option lists should be reviewed by someone higher up (e.g. general counsel, HR)

Images

(/admin/structure/webform/config/images/manage)

Submissions

(/admin/structure/webform/config/submissions)

No comments

Handlers

Email Settings

Submitted values are: [webform_submission:values]

  - No objection
- Default email body (HTML)

Submitted on [webform_submission:created]

Submitted by: [webform_submission:user]

Submitted values are:

[webform_submission:values]


  - No objection
### Submission Handlers
- Action
  - Trigger an action on a submission.
  - Unlikely to be used; can be added later if needed
- Debug
  - Debug webform submission.
  - Unlikely to be used; can be added later if needed
- Remote post
  - Posts webform submissions to a URL.
  - Unlikely to be used; can be added later if needed
- Email
  - Sends a webform submission via an email.
  - No objection
- Settings
  - Allows Webform settings to be overridden based on submission data, source entity fields, and conditions.
  - Unlikely to be used; can be added later if needed

## Exporters
(/admin/structure/webform/config/exporters)

The default settings all look fine.

## Libraries
(/admin/structure/webform/config/libraries)

- Algolia Places
  - Algolia Places provides a fast, distributed and easy way to use an address search autocomplete JavaScript library on your website. (Algolia Places is by the location places elements.)
  - Disable
- CKEditor: Autogrow
  - Automatically expand and shrink vertically depending on the amount and size of content entered in its editing area. (Allows CKEditor to automatically expand and shrink vertically.)
  - Disable (we'll be using a custom editor that should be loading from core's CKEditor module)
- CKEditor: CodeMirror
  - Provides syntax highlighting for the CKEditor with the CodeMirror Plugin. (Makes it easier to edit the HTML source.)
  - Disable
- CKEditor: Fake Objects
  - Utility required by CKEditor link plugin. (Allows CKEditor to use basic image and link dialog.)
  - Disable (we'll be using a custom editor that should be loading from core's CKEditor module)
- CKEditor: Image
  - Provides a basic image dialog for CKEditor. (Allows CKEditor to use basic image dialog, which is not included in Drupal core.)
  - Disable (we'll be using a custom editor that should be loading from core's CKEditor module)
- CKEditor: Link
  - Provides a basic link dialog for CKEditor. (Allows CKEditor to use basic link dialog, which is not included in Drupal core.)
  - Disable (we'll be using a custom editor that should be loading from core's CKEditor module)
- Code Mirror
  - Code Mirror is a versatile text editor implemented in JavaScript for the browser. (Code Mirror is used to provide a text editor for YAML, HTML, CSS, and JavaScript configuration settings and messages.)
  - Disable
- jQuery: Chosen
  - A jQuery plugin that makes long, unwieldy select boxes much more user-friendly. (Chosen is used to improve the user experience for select menus. Chosen is an alternative to Select2.)
  - Choose either jQuery: Chosen or Select2; confer with DCF maintainer
- jQuery: Input Mask
  - Input masks ensures a predefined format is entered. This can be useful for dates, numerics, phone numbers, etc…(Input masks are used to ensure predefined and custom formats for text fields.)
  - No objection
- jQuery: International Telephone Input
  - A jQuery plugin for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods.(International Telephone Input is used by the Telephone element.)
  - No objection
- jQuery: RateIt
  - Rating plugin for jQuery. Fast, progressive enhancement, touch support, customizable (just swap out the images, or change some CSS), unobtrusive JavaScript (using HTML5 data-* attributes), RTL support. The Rating plugin supports as many stars as you'd like, and also any step size. (RateIt is used to provide a customizable rating element.)
  - Disable (we're not enabling the rating element)
- jQuery: Select2
  - Select2 gives you a customizable select box with support for searching and tagging.(Select2 is used to improve the user experience for select menus. Select2 is the recommended select menu enhancement library.)
  - Choose either jQuery: Chosen or Select2; confer with DCF maintainer
- jQuery: Text Counter
  - A jQuery plugin for counting and limiting characters/words on text input, or textarea, elements. (Word or character counting, with server-side validation, is available for text fields and text areas.)
  - No objection
- jQuery: Timepicker
  - A lightweight, customizable javascript timepicker plugin for jQuery, inspired by Google Calendar. (Timepicker is used to provide a polyfill for HTML 5 time elements.)
  - Is the polyfill necessary for our userbase?
- Progress Tracker
  - A flexible SASS component to illustrate the steps in a multi-step process e.g. a multi-step form, a timeline or a quiz. (Progress Tracker is used by multi-step wizard forms.)
  - No objection
- Signature Pad
  - Signature Pad is a JavaScript library for drawing smooth signatures. It is HTML5 canvas based and uses variable width Bézier curve interpolation. It works in all modern desktop and mobile browsers and doesn't depend on any external libraries. (Signature Pad is used to provide a signature element.)
  - Disable (we're not enabling the signature element)
- jQuery: Geocoding and Places Autocomplete Plugin
  - Deprecated
- jQuery: iCheck
  - Deprecated
- jQuery: Toggles
  - Deprecated

Should these libraries continue to be served via CDN or should we serve them ourselves?

## Advanced

### User Interface Settings

This section is somewhat of a catch-all for UI settings.

I recommend checking the following settings:
- Save details open/close state
- Disable promotions
- Disable 'Contribute' section

I want to check with the DCF maintainer re the following setting:
- Display element description as help text (tooltip) (If checked, all element descriptions will be moved to help text (tooltip).)

We need to decide if we want to leave the Help text and videos enabled.

### Requirement Settings

- Check if CDN is being used for external libraries?
  - If we decided we're ok with serving via CDN, then disable
- Check if the Webform Bootstrap Integration module is installed when using the Bootstrap theme
  - Uncheck
- Check if SPAM protection module is installed
  - If we opt to not use any of the suggested anti-SPAM modules, then disable

## Permissions

We should get something committed for #26 so we can assigned permissions here.
ericras commented 4 years ago

We can probably leave this open for the time being and make changes.

Probably want to throw HOneypot in here too

macburgee1 commented 4 years ago

Element changes:

macburgee1 commented 4 years ago

I removed the following elements:

macburgee1 commented 4 years ago

Re 'Allowed Tags', I believe this setting is disused because we're using our own CKEditor editor.

macburgee1 commented 4 years ago

The range element isn't useful. The user has no idea of know the value s/he has selected.

macburgee1 commented 4 years ago

Here's the status of this pull request:

Paged Forms

Select2 vs Chosen

We have the option of offering Select2 or Chosen for select and multi-select lists. The Webform maintainers have expressed a preference for Select2. In my limited testing, they're functionally equivalent - at least in terms how they're being utilized by Webform. If we do offer one, I think we should choose only one.

Antibot vs Honeypot

There are a couple of modules we're looking at for anti-SPAM: Antibot and Honeypot. We're going to stick with Honeypot.

Options

We still need to consider which default options lists should be either 1) modified or 2) removed.

File Upload Settings

Email Settings

Permissions

When we get roles committed to the codebase, we'll want to circle back around for Webform permissions.

macburgee1 commented 4 years ago

I added a UNL Webform Test module that will install a pre-configured form with the various elements and configurations we've been testing against. Honey pot is installed and enabled.

When testing, be sure to use the issue-8-forms-webform branch of unl_five.

I'm going to give Ryan another pass on Monday before assigned to Eric.

macburgee1 commented 4 years ago

We need to merge in master now that the Editor role is defined and then assign Webform permissions to Editor.

ericras commented 4 years ago

Once the “reference”: “master” issue is resolved for the libraries, I think this can be merged. Some small things will inevitably come up later. (For instance, maybe add "jpeg" as a default image type?)

macburgee1 commented 4 years ago

Merged master branch into issue-9-webform

Paged Forms

Pager is styled. Next/Previous button issue is deferred

Select2 vs Chosen

The choice of Select2 vs jQuery Chosen is deferred. Both have been removed for now.

Options

Several of the options lists have been removed. The countries lists are unchanged. If these lists becomes an issue for the University down the road, then we can address them then.

File Upload Settings

Max upload limit per element has been set to 20 MB. JPEG has been whitelisted

Email Settings

In the absence of feedback, we're leaving the aforementioned settings for now.

Permissions

Permissions have been added to the Editor role. I needed to override a few routes provided by Webform to deny access to routes (effectively remove them) where permissions either 1) didn't exist for the route or 2) were too permissive.

ericras commented 4 years ago

The Access tab is scary and removing it at this time is ok. Ideally, someone with permission to edit the form would have access to the "Create submissions->Roles" portion of that page. People frequently use that option in D7 to limit submissions to people with a UNL login (authenticated users).

macburgee1 commented 4 years ago

Re the access tab, I've created a follow-up issue: #79