You are here

function party_attached_entity_edit_form_form in Party 8.2

Same name and namespace in other branches
  1. 7 plugins/content_types/party_attached_entity_edit_form.inc \party_attached_entity_edit_form_form()

Form

1 string reference to 'party_attached_entity_edit_form_form'
party_forms in ./party.module
Implements hook_forms().

File

plugins/content_types/party_attached_entity_edit_form.inc, line 81
CTools content for user edit form

Code

function party_attached_entity_edit_form_form($form, &$form_state, $party, $data_set, $delta = 0) {

  // Load the include
  form_load_include($form_state, 'inc', 'party_dashboard', 'plugins/content_types/party_attached_entity_edit_form');
  form_load_include($form_state, 'inc', 'party', 'party.pages');

  // Get the form
  $form = party_attached_entity_edit_form($form, $form_state, $party, $data_set, $delta);

  // Add our submit handler and set the action
  $form['#submit'][] = 'party_attached_entity_edit_form_form_submit';
  $form['#action'] = base_path() . str_replace('ajax', 'nojs', request_path());

  // Remove URL Redirects
  foreach ($form as $name => &$element) {
    if (substr($name, 0, 1) != '#' && isset($element['redirect'])) {
      $element['redirect']['#access'] = FALSE;
    }
  }
  return $form;
}