Define

admin's picture
function legal_display_fields() { $form = array(); $conditions = legal_get_conditions(); $form['id'] = array( '#type' => 'value', '#value' => $conditions['id'], ); $form['legal'] = array( '#type' => 'fieldset', '#title' => t('Terms and Conditions of Use'), '#weight' => 29, ); $form['legal']['conditions'] = array( '#type' => 'textarea', '#title' => t('Terms & Conditions'), '#default_value' => $conditions['conditions'], '#value' => $conditions['conditions'], '#rows' => 10, '#weight' => 0, '#attributes' => array('readonly' => ''), ); $form['legal']['legal_accept'] = array( '#type' => 'checkbox', '#title' => t('Accept Terms & Conditions of Use'), '#default_value' => 0, '#weight' => 50, '#required' => TRUE, ); $form['#after_build'] = array('legal_preview'); $form['preview'] = array( '#type' => 'button', '#value' => t('Preview'), ); $form['save'] = array( '#type' => 'submit', '#value' => t('Save'), ); $output = drupal_get_form('legal_administration', $form); return $output; }