logicbrush/silverstripe-userforms-utils

A collection of enhancements and utilities for the Silverstripe UserForms module

Installs: 6 564

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

v1.3.0 2024-10-11 11:10 UTC

This package is auto-updated.

Last update: 2025-03-11 12:14:42 UTC


README

A collection of enhancements & utilities for the Silverstripe CMS UserForms module.

These include:

  • a shortcode with which to insert a user form into any content area;
  • a form widget that presents a user form (requires silverstripe/widgets);
  • various additional validations for existing form fields;
  • various new form fields.

Installation

composer require "logicbrush/silverstripe-userforms-utils"

Shortcode

To use the form shortcode we insert [userform id="x"] in a HTMLText area where x is the user form page ID.

By default the UserForms module CSS and Javascript requirements will be loaded when using the shortcode. This can be turned off by setting the following in a yml config file:

Logicbrush\UserFormsUtils\Shortcodes\UserFormShortcodeProvider:
  block_default_userforms_requirements: true

Form Widget

Upon installation, the form widget will be available for insertion into any sidebar area using the CMS interface.

You have the ability to customize display with the following options:

  • Select a form - Choose the User Form page to be displayed.
  • Introductory text - Specify arbitrary text that precedes the display of the form in the sidebar.
  • Show form title? - Choose whether to display the title of the form page.
  • Show form content? - Chose whether to display the content of the form page.

Additional Field Validations

Maximum File Size

The maximum file size for a form fields will now be checked prior to submission. This is much more responsive for the user.

New Form Fields

This module provides a selection of new field types to use with your user forms.

HTML5 Date Field

A field that utilizes the native HTML5 date input type. This enables browser-based input control and validation.

US State Dropdown Field

A field that provides a dropdown of all US States, including DC.

Signature Field

A field that collects a signature. Implemented using jSignature.