Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
A developer module to make form creation easier and eliminate repetitive coding.
Example:
$form = array();
$form['first_name'] = form_helper_textfield(t('First Name'), 'Joe');
$form['last_name'] = form_helper_textfield(t('Last Name'), 'Cool');
$form['gender'] = form_helper_radios(t('Gender'), array('male' => t('Male'), 'female' => t('Female')), NULL, TRUE);
return $form;
is the equivalent of this:
$form = array();
$form['first_name'] = array(
'#type' => 'textfield',
'#title' => t('First Name'),
'#default_value' => 'Joe',
);
$form['first_name'] = array(
'#type' => 'textfield',
'#title' => t('Last Name'),
'#default_value' => 'Cool',
);
$form['gender'] = array(
'#type' => 'radios',
'#title' => t('Gender'),
'#options' => array('male' => t('Male'), 'female' => t('Female')),
'#required' => TRUE,
);
return $form;
Project information
- Module categories: Developer Tools
- 2 sites report using this module
- Created by noahlively on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
7.x-1.0-alpha1
released 3 July 2012
Works with Drupal: 7.x
✓ Recommended by the project’s maintainer.
Development version: 7.x-1.x-dev updated 4 Jul 2012 at 00:19 UTC