Form API Workshop: From basics to ajax and beyond

Speakers: 

Forms are the key web components for interaction between users and the website. It also happens that forms are one of the first things that a beginner start looking into when building his first module. A deep knowledge in the forms workflow will help you to provide an improved user experience while keeping the website access secure and troubleshoot issues with forms.

This is a workshop, so bring your laptop and get ready to get your hands dirty. We will go through a series of practical exercises which will cover from the basic concepts to more advanced topics like handing ajax events with forms and will review some of the best practices when building custom forms for Drupal. We will work with a prepared custom Drupal distribution that is aimed to be "hacked" for training purposes. Some of the topics that will be covered by the exercises are:

  • Basic Concepts, the form API
  • Form execution workflow
  • Validation and submission handlers
  • After build, pre-render and post-render callbacks
  • Form elements
  • Create a basic form
  • Upload and store an image with managed_file form element
  • Add date input to a form
  • Create new form element types
  • Fieldsets and Vertical Tabs
  • Working with the Ajax Framework
  • The #ajax property
  • Adding new input elements to a form
  • Altering form elements
  • More use cases
  • Multistep Forms
  • Draggable Table Forms
  • Altering Existing Forms Best Practices

I am very passionate about this subject and I have given a few talks and workshops about it in past events with a lot of interest and great feedback from the participants which had helped me to improve this workshop over the time.

Schedule info
Track: 
Experience level: 
Intermediate
Drupal Version: 
Drupal 7.x