You are here

function form_builder_property_weight_form in Form Builder 7

Same name and namespace in other branches
  1. 6 includes/form_builder.properties.inc \form_builder_property_weight_form()

Configuration form for the "weight" property.

This field is in the "hidden" builder group, meaning it's never shown in the main editing interface. However, it's still there if editing without JS.

1 string reference to 'form_builder_property_weight_form'
form_builder_form_builder_properties in ./form_builder.module
Implementation of hook_form_builder_properties().

File

includes/form_builder.properties.inc, line 116
form_builder.properties.inc Implementations of hook_form_builder_properties in separate functions.

Code

function form_builder_property_weight_form(&$form_state, $form_type, $element, $property) {
  $form = array();
  if (!isset($_REQUEST['js'])) {
    $form['weight'] = array(
      '#form_builder' => array(
        'property_group' => 'hidden',
      ),
      '#type' => 'textfield',
      '#size' => 6,
      '#title' => t('Weight'),
      '#default_value' => $element['#weight'],
    );
  }
  return $form;
}