Skip Navigation

[Résolu] urlparam in cred form submit dont redirect to the right post

This support ticket is created Il y a 7 années. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Ce sujet contient 18 réponses, a 2 voix.

Dernière mise à jour par davidZ-4 Il y a 7 années.

Assisté par: Minesh.

Auteur
Publications
#591658

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: 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

Les langues: Anglais (English )

Fuseau horaire: 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