Form States: Developing & Building for Content Editor UX
The Form States API in Drupal core (both 7 and 8), allows easy improvements of forms whether for content editors or end users. It is a particularly powerful way to ensure that content editors create content that matches the architecture plan without needing prior knowledge. Hide that field if it isn't needed. Require this field if they enter certain content in anther field.
The Form States API is well tested and mature from Drupal 7 although it has a few improvements in Drupal 8 - and there are still further improvements in progress and it doesn't work great with date fields. Although this session will focus on Drupal 8, the API knowledge will be 95% directly compatible with Drupal 7.
In fact, you don't need any Drupal 8 experience to gain the full benefits of this session whether you'll be using it for Drupal 7 or Drupal 8 (or 9). Some basic understanding of PHP and jQuery is strongly recommended although not required; the first 15-20 minutes will be focused on using the API through code.
This session should give attendees:
- An understanding of the Form States API including its limitations
- Familiarity with selecting the right selectors for use with the Form States API.
- Comfortable with programatically using the Form States UI
- Familiarity with the Form States UI module and using it to on content entity forms.