Warning message

Newsletter category Drupal Developer newsletter format has not been set to HTML. There will be no statistics recorded for this newsletter.

Drupal: Make single checkbox a required field

This CodeLet will make a single checkbox a require field. This is usefule when you are creating a checkbox in your custom module.


$form['terms_condition'] = array(
'' => 'checkboxes',
'' => t('Terms & condition'),
'' => array(
1 => t('I agree to Terms & condition'),
'' => TRUE,

Make single checkbox a required field in Drupal | Drupal Developer

By DrupalD on Fri, 12/07/2013 - 7:49pm

Add comment

Log in or register to post comments
QR code for this page URL This page URL