Skip Navigation

[Resolved] urlparam in cred form submit dont redirect to the right post

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 18 replies, has 2 voices.

Last updated by davidZ-4 7 years ago.

Assisted by: Minesh.

Author
Posts
#591658

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - I'm not using folder name.

Is there any IP or country wise restrictions? My IP is: 103.240.34.86

#591660

no ip restrictions.
in FileZilla use: encryption: "Use explicit ftp over tls if available"
if you dont use filezilla, tell me what ftp client you use and I will test it on my end.

David

#591697

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Indeed - it was issue of FileZilla use: encryption: "Use explicit ftp over tls if available"

Could you please check now. I've adjusted the code as given under:

add_filter('cred_success_redirect', 'func_redirect_to_page',10,3);
function func_redirect_to_page($url, $post_id, $form_data){
    if ($form_data['id']==1719){
        return  $_SERVER['HTTP_REFERER'];
    }
	if ($form_data['id']==1716){
		
		$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]/education-fund-need-analysis/";
		$parent_id = get_post_meta($post_id,'_wpcf_belongs_education-parent_id',true);
		$actual_link = $actual_link."?edi=". $post_id."&edp=".$parent_id ;
	return  $actual_link;
    }
         
    return $url;
}

I can see that the page is redirected successfully. Could you please confirm. 🙂

#591712

This is working great!
Thank you Minesh,

David