I've noticed that a logged in user can still access the registration form and make use of it. Not really practical. Is there any way that the user will be redirected to the homepage on click?
I've noticed that a logged in user can still access the registration form and make use of it. Not really practical. Is there any way that the user will be redirected to the homepage on click?
Hi, ignatiusjeroe,
You can accomplish this by adding some code using the "gform_pre_render" (http://www.gravityhelp.com/documentation/page/Gform_pre_render) hook. The example below is something you could add to your theme's functions.php file:
//add the pre_render filter for form id = 5
add_action("gform_pre_render_5", "redirect_logged_in_user");
function redirect_logged_in_user()
{
if (is_user_logged_in())
{
echo '<script language="javascript">location.href="http://www.rocketgenius.com"</script>';
}
}