Skip Navigation

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

This support ticket is created hace 7 años. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 18 respuestas, tiene 2 mensajes.

Última actualización por davidZ-4 hace 7 años.

Asistido por: Minesh.

Autor
Mensajes
#591658

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: 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