In order to be able to quickly edit Fullcalendar items, I altered the node edit form of the specific content type so the events are saved with AJAX and the page doesn’t have to reload.
However, I don’t know how to close the overlay afterwards. I found overlay_close_dialog(), but how do I implement this in my functions (I’m very new to Drupal coding)?
Until now I have:
<?php /** * Implements hook_form(). */ function fullcalendar_ajax_node_save_form_alter(&$form, &$form_state, $form_id) { if( $form_id == 'agenda_item_node_form') { $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Add to Apple Form'), '#weight' => 50, '#ajax' => array( 'wrapper' => 'agenda-item-node-form', 'callback' => 'fullcalendar_ajax_node_save_callback', 'effect' => 'fade' ), '#submit' => array ( 0 => 'node_form_submit', ), ); } return $form; } function fullcalendar_ajax_node_save_callback($form, &$form_state) { $form_state['rebuild'] = TRUE; return $form; } ?>