Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. function job_listings_form_alter(&$form, &$form_state, $form_id) {
  2.   if ($form_id == 'job_listing_node_form') {
  3.     $form['actions']['submit']['#value'] = 'Submit';
  4.     $form['actions']['submit']['#submit'][] = 'job_listings_submit';
  5.   }
  6. }
  7.  
  8. /**
  9.  * This hijacks the submission of the Job Listing 'node add' form, and redirects to the given path
  10.  */
  11. function job_listings_submit($form, &$form_state) {
  12.   $form_state['redirect'] = '/job-listing/thank-you';
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement