Tom Select

Applies the Tom Select multiselect prettifier to all select elements in forms.

The Tom Select module applies the Tom Select multiselect prettifier to all select elements in forms.

Can be added to single select fields by adding the .tomselect class to the element.

No configuration options provided yet, and only default settings used for Tom Select so far.

Uses jsdelivr to get the JavaScript and CSS for Tom Select.

Co-maintainers and merge requests welcome!

Form API Workflow

Introduction

The complete Form API workflow is complex and has many different cases. That's why we'll start small.

When Drupal serves a page that includes a form, first the form is created according to the build function of the form. Once the user submits the form, Drupal again builds the form on the submit request. This is because Drupal needs to check that the submitted form and values match the actual form.

AJAX Forms - deprecated page

this page should be removed.

Using Honeypot

Honeypot form protection

Honeypot form protection means that an invisible field is added to a form. If this invisible field is filled out (bots will usually put in a value), then the form will return an error. Normal users (read: human beings) won't ever see the field, so they won't fill it out. Even if they do, the field is labeled in such a way as to indicate the human shouldn't fill out the field.

Honeypot

User-friendly spam bot form protection

Honeypot uses both the honeypot and timestamp methods of deterring spam bots from completing forms on your Drupal site. These methods are effective against many spam bots, and are not as intrusive as CAPTCHAs or other methods which punish the user [YouTube].

Form Render Elements

Form Elements

Form render elements are a subset of render elements, representing elements for HTML forms, which can be referenced in form arrays.  

List of form and render elements

The class Drupal\Core\Render\Element\FormElementBase provides a base class for form element plugins

Pages

Subscribe with RSS Subscribe to RSS - forms