Hello all,
I want the form to redirect to a url when its submitted, but include the email address that was entered on the form.
Like this, http://www.mydomain.com/confirmation.php?email=[email]
When I export the form and submit it, I get this in the address bar,
"http://www.mydomain.com/confirmation.php?email=[email]"
How can I make this work?
Thanks,
Lucas
include variable in redirect...
I think I found where I need to edit at (if it can't be done inside form builder)
fbapp/php/formcontroller.cls.php
This block of code:
function Redirect ( )
{
$url = Config::GetInstance()->GetConfig( 'settings', 'redirect_settings', 'gotopage' );
if( empty($url) ) {
$url = "http://www.coffeecup.com/form-builder/";
} elseif( ! url( $url) ) {
isset( $_SERVER['HTTPS'] ) ? $proto = "https" : $proto = "http";
$uri_parts = parse_url( $_SERVER['REQUEST_URI'] );
$path = $uri_parts['path'];
$path_segments = explode( '/', $path );
$path = implode( '/', array_slice($path_segments,0, count( $path_segments ) - 1 ) );
$url = sprintf( '%s://%s%s/%s', $proto, $_SERVER['HTTP_HOST'], $path, $url );
}
ob_end_clean();
// if this came from an iframe, we must force the browser to break out to the parent frame
if( isset( $_POST[ CC_FB_EMBEDDED ] ) || Config::GetInstance()->GetSessionVariable( CC_FB_EMBEDDED ) )
{
echo '<html><script type="text/javascript">'
. 'top.location.href = "' . $url . '";'
. '</script></html>';
} else {
header( "Location: " . $url );
}
exit( 0 );
}
fbapp/php/formcontroller.cls.php
This block of code:
function Redirect ( )
{
$url = Config::GetInstance()->GetConfig( 'settings', 'redirect_settings', 'gotopage' );
if( empty($url) ) {
$url = "http://www.coffeecup.com/form-builder/";
} elseif( ! url( $url) ) {
isset( $_SERVER['HTTPS'] ) ? $proto = "https" : $proto = "http";
$uri_parts = parse_url( $_SERVER['REQUEST_URI'] );
$path = $uri_parts['path'];
$path_segments = explode( '/', $path );
$path = implode( '/', array_slice($path_segments,0, count( $path_segments ) - 1 ) );
$url = sprintf( '%s://%s%s/%s', $proto, $_SERVER['HTTP_HOST'], $path, $url );
}
ob_end_clean();
// if this came from an iframe, we must force the browser to break out to the parent frame
if( isset( $_POST[ CC_FB_EMBEDDED ] ) || Config::GetInstance()->GetSessionVariable( CC_FB_EMBEDDED ) )
{
echo '<html><script type="text/javascript">'
. 'top.location.href = "' . $url . '";'
. '</script></html>';
} else {
header( "Location: " . $url );
}
exit( 0 );
}
There is a way. If you redirect to a script the script could read the MySQL database or a csv file extract the data and redirect to the URL given as one of the form entries.
There are lots of examples available to parse the data to variables and also how to send mail. A bit of research or you could get the script written for you. Best not to change WFB files. use the output, less problems that way. Then if something breaks you know it is not WFB or its files.
There are lots of examples available to parse the data to variables and also how to send mail. A bit of research or you could get the script written for you. Best not to change WFB files. use the output, less problems that way. Then if something breaks you know it is not WFB or its files.
The Guy from OZ
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.