I was just curious it was possible to have a textarea instead of the text fields for data that needs a line break.

Thanks for the hard work on this. It has certainly made things easier for building and managing tables.

Comments

kevin hankens’s picture

Status: Active » Closed (fixed)

Check out line 382 in tablefield.module

      $element['tablefield']['cell_' . $i . '_' . $ii] = array(
        '#type' => 'textfield',
        '#size' => 10,
        '#attributes' => array('id' => 'tablefield_' . $delta . '_cell_' . $i . '_' . $ii),
        '#default_value' => (empty($field_value)) ? $default_value[$i][$ii] : $field_value,
        '#prefix' => '<td>',
        '#suffix' => '</td>',
      );

You could change the form #type to whatever you like here.

Good luck!

vthirteen’s picture

you can get a textarea, for example, but it'll be processed as a textfield anyway. that is, you won't be able to pass html, no wysiwyg, as in the rest of textareas (if you set input formats in that way). am i wrong?

EDIT: my mistake, wysiwyg editor won't work, but you can indeed pass some html.