我想提交重力表单,然后重定向到自定义表单操作URL(重定向到支付网关),我想要在其中发送表单数据。
当用户提交重力表单时,通过POST将必要的数据提交到自定义表单操作url,或者应该提交表单。
我真的很感谢你的帮助。
发布于 2021-06-19 07:34:54
查看gform_confirmation过滤器,它允许您更改确认消息或重定向表单的URL。
add_filter( 'gform_confirmation', 'custom_confirmation', 10, 4 );
function custom_confirmation( $confirmation, $form, $entry, $ajax ) {
if( $form['id'] == '1' ) {
$confirmation = array( 'redirect' => 'http://www.website.com' );
}
return $confirmation;
}https://stackoverflow.com/questions/68037670
复制相似问题