diff --git a/includes/class-formidable.php b/includes/class-formidable.php index eb76fb4..0466751 100644 --- a/includes/class-formidable.php +++ b/includes/class-formidable.php @@ -370,7 +370,7 @@ class DDHH_JM_Formidable { */ public static function create_job_submission_form() { // Check if Formidable is active - if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { + if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) { return; } @@ -523,7 +523,15 @@ class DDHH_JM_Formidable { ), ); - FrmFormAction::create( 'wppost', $form_id, $action_values ); + // Create the form action using the proper API + FrmFormActionsController::create_action( + $form_id, + array( + 'post_excerpt' => 'wppost', + 'post_content' => $action_values, + 'menu_order' => 1, + ) + ); } } @@ -532,7 +540,7 @@ class DDHH_JM_Formidable { */ public static function create_job_edit_form() { // Check if Formidable is active - if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { + if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) { return; } @@ -685,7 +693,15 @@ class DDHH_JM_Formidable { ), ); - FrmFormAction::create( 'wppost', $form_id, $action_values ); + // Create the form action using the proper API + FrmFormActionsController::create_action( + $form_id, + array( + 'post_excerpt' => 'wppost', + 'post_content' => $action_values, + 'menu_order' => 1, + ) + ); } } @@ -732,7 +748,7 @@ class DDHH_JM_Formidable { */ public static function create_job_deactivation_form() { // Check if Formidable is active - if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { + if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) { return; } @@ -813,7 +829,15 @@ class DDHH_JM_Formidable { ), ); - FrmFormAction::create( 'wppost', $form_id, $action_values ); + // Create the form action using the proper API + FrmFormActionsController::create_action( + $form_id, + array( + 'post_excerpt' => 'wppost', + 'post_content' => $action_values, + 'menu_order' => 1, + ) + ); } }