You are here

function _cell_validate in TableField 7.3

Custom callback for a textarea to be processed for linebreaks.

1 string reference to '_cell_validate'
tablefield_field_widget_form in ./tablefield.module
Implements hook_field_widget_form().

File

./tablefield.module, line 1811
Provides a set of fields that can be used to store tabular data with a node.

Code

function _cell_validate($element, &$form_state) {
  $value = $element['#value'];
  if (!empty($element['#value'])) {
    $value = nl2br($value);
    form_set_value($element, $value, $form_state);
  }
}