You are here

function _webform_edit_matrix in Webform Matrix Component 7.3

Same name and namespace in other branches
  1. 6 components/matrix.inc \_webform_edit_matrix()
  2. 7.4 components/matrix.inc \_webform_edit_matrix()
  3. 7 components/matrix.inc \_webform_edit_matrix()
  4. 7.2 components/matrix.inc \_webform_edit_matrix()

Implements _webform_edit_component().

File

components/matrix.inc, line 56
Webform module matrix component.

Code

function _webform_edit_matrix($component) {
  $form = array();
  $max_rows = variable_get('webform_matrix_component_webform_matrix_rows', 10);
  $form['extra']['matrix_row'] = array(
    '#type' => 'select',
    '#title' => t('Matrix Rows'),
    '#options' => array_combine(range(1, $max_rows), range(1, $max_rows)),
    '#default_value' => isset($component['extra']['matrix_row']) ? $component['extra']['matrix_row'] : "1",
    '#weight' => 0,
    '#parents' => array(
      'extra',
      'matrix_row',
    ),
  );
  return $form;
}