You are here

function _maxlength_cck_form_submit in Maxlength 6.2

Same name and namespace in other branches
  1. 7 maxlength.inc \_maxlength_cck_form_submit()
  2. 7.2 maxlength.inc \_maxlength_cck_form_submit()
1 string reference to '_maxlength_cck_form_submit'
_maxlength_cck_form_alter in ./maxlength.inc

File

./maxlength.inc, line 156
Business logic for maxlength

Code

function _maxlength_cck_form_submit($form, &$form_state) {

  //note, max lenght for the CCK field is stored in this way as for textareas, its not in $element var passed to theme functions.
  variable_set('maxlength_' . $form['field_name']['#value'], $form['#post']['maxlength_' . $form['field_name']['#value'] . '_length']);
  variable_set('maxlength_' . $form['field_name']['#value'] . '_js', $form['#post']['maxlength_' . $form['field_name']['#value'] . '_js']);
  variable_set('maxlength_' . $form['field_name']['#value'] . '_text', $form['#post']['maxlength_' . $form['field_name']['#value'] . '_text']);
}