Form api

Drupal Tableselect with fields

in drupal, form api, fapi, fields, tableselect

We all know that Drupal provides the FormAPI, in which very powerful form elements exist (in our case, the tableselect element). This magical element behaves like a table, but has a checkbox for each line, and associated JS/CSS to handle checking rows. But it is normally impossible to add additional form elements on each row ( there have been many workarounds, but all seem hackish) due to the way Drupal handles form submission. This is how to have a clean (and simple!) way to go around those restrictions.

Read more »

Drupal forms and redirection

in drupal, form api

You've created a form through the forms API, and because you want some custom behavior, you need it to post back to you... so why does you get a 302 redirect when trying to process it?!

Read more »