In the Ninja Forms Webhooks extension, is it possible to intercept the submit without editing the plugin’s process() function?

I am attempting to edit a form’s submission variables before they are submitted to the action URL. I am able to accomplish what I want by changing

$args[ $vars['key'] ] = $value;

in the initial foreach loop of the process() function in action-webhooks.php to

Read More
if (is_array ($value)) {
    $args[ $vars['key'] ] = implode(';', $value);
}
else {
    $args[ $vars['key'] ] = $value;
}

This is obviously a bad solution since this code will be overwritten if the plugin is updated. Is there an action or filter that I can use to accomplish this from my own code? Thanks.

Related posts

1 comment

  1. From what I can tell, it looks like using the ninja forms processing method you can set the variables before the form is completely processed.

    global $ninja_forms_processing;
    
    //get the form id
    $form_id = $ninja_forms_processing->get_form_ID();
    
    //The id of the form you want to check
    $form_to_check = 5;
    
    if($form_id == 5)
    {
        //What the user entered
        $user_value = $ninja_forms_processing->get_field_value( 3 );
    
        if(is_array($user_value))
        {
            //set the value to what it you want it to be
            $new_value = implode(';', $user_value);
            $ninja_forms_processing->update_field_value( 3, $new_value );
        }
    } 
    

Comments are closed.