Australia’s premium Drupal strategy, design & development experts

Since 2009, we’ve built more large scale Drupal websites in Australia for Government, Media, Education and Enterprise clients than any other company. This specialist experience, coupled with our recognition as one of the Top 5 companies contributing code to Drupal globally, means we can provide full lifecycle services for your complex Drupal websites.
Find out more
Brisbane City Council
Brisbane City Council

Driving Community Engagement

Brisbane City Council launches their website on aGov, PreviousNext's open Drupal platform for Australian Government websites.
Read The Case Study

Using typey: a framework for working with typography on the web

typey has just turned 1.0, so I thought it would be a great time to show off some of its features.

Handling Errors in Complex Drupal Form Validation

Recently, I have been working on a site which has a big mutli-step form which is using a lot of custom form elements, custom auto-completes, custom form api states and ajax based sub-forms. It is all built using Drupal form api. The best thing about this form is that all the fields and sub-forms map to a data model. This gives us the benefit of validating the form fields using the Symfony validation component. This is good because we can write all the validation separately and test it using phpunit without bootstrapping Drupal. To convert this data model into form fields we wrote a form factory and connected it all together using the service container module.

Whenever you are working with complex multistep forms and updating a sub-form based on user input then you can't exactly show the form errors in the order in which the fields appeared on the form. In this post I'll explain a process in which we can achieve just that - keeping the form error messages in the same order as the form fields.

Back to top