Redirect to URL in a new tab

Labels

This Discussion is public

Notifications

This is the solution provided by authors: https://formidableforms.com/knowledgebase/javascript-examples/javascript-after-form-submit/

However, it didn't work for me in Chrome (pop-up window blocked).

I found that adding the attribute target="_blank" to the form, opens a new tab on submit.

(https://formidableforms.com/knowledgebase/frm_form_attributes/)

add_filter( 'frm_form_attributes', 'add_custom_form_attributes', 10, 2 );
function add_custom_form_attributes( $attributes, $form ){
if ( $form->id == 123 ) {
$attributes .= 'target="_blank"';
}

return $attributes;
}

Reply to this Discussion