You are here

function markup_element_process in Markup 6

Process the markup_element element.

Build the form element. When creating a form using FAPI #process, note that $element['#value'] is already set.

The $fields array is in $form['#field_info'][$element['#field_name']].

1 string reference to 'markup_element_process'
markup_elements in ./markup.module
Implements hook FAPI hook_elements().

File

./markup.module, line 245
Defines a field type for displaying markup on the node/edit form.

Code

function markup_element_process($element, $edit, $form_state, $form) {

  // Find out which display_style we are using and whether we need to hide the
  // Title and/or wrapper.
  switch ($element['#display_style']) {
    case 'all':
      break;
    case 'wrapper':
      unset($element['#title']);
      break;
    case 'none':
    default:
      unset($element['#title']);
      $element['#hide_wrapper'] = 1;
      break;
  }
  return $element;
}