WordPress.org

Forums

FormBuilder
where to add the php code for form data insertion (5 posts)

  1. betson
    Member
    Posted 2 years ago #

    Hi,

    Where we should add the code for database insertion when the form is submitted?

    http://wordpress.org/extend/plugins/formbuilder/

  2. nenjap31
    Member
    Posted 2 years ago #

    hi betson,

    1. choose action= alternate action and then fill THANKYOUTEXT with url file where you put the code.
    2. In file code,to get the data you can use $_REQUEST[fieldname]

  3. ChokoL@te
    Member
    Posted 2 years ago #

    Nenjap21, we would preffer only change tables and databases from file save this data. Its a shorcut. Can you tell wich files do this? We have the last version v 0.91.

  4. nambo
    Member
    Posted 2 years ago #

    Thanks nenjap31. I put the URL into the THANKYOUTEXT but always get a server warning:

    Warning: parse_url() expects parameter 1 to be string, array given in C:\wamp\www\testsite\wp-content\plugins\formbuilder\modules\alternate_action.php on line 168
    # Time Memory Function Location
    1 0.0012 368848 {main}( ) ..\index.php:0
    2 0.0021 372456 require( 'C:\wamp\www\testsite\wp-blog-header.php' ) ..\index.php:17
    3 0.7113 35631840 require_once( 'C:\wamp\www\testsite\wp-includes\template-loader.php' ) ..\wp-blog-header.php:16
    4 0.7113 35631904 do_action( ) ..\template-loader.php:7
    5 0.7115 35633160 call_user_func_array ( ) ..\plugin.php:403
    6 0.7115 35633176 formbuilder_init( ) ..\plugin.php:0
    7 0.7127 35636480 formbuilder_checkPOSTData( ) ..\formbuilder.php:260
    8 0.7129 35637160 formbuilder_process_form( ) ..\formbuilder_processing.inc.php:33
    9 0.7384 35732936 formbuilder_process_alternate_action( ) ..\formbuilder_processing.inc.php:942
    10 0.7385 35733872 formbuilder_curlRequest( ) ..\alternate_action.php:66
    11 0.7385 35733872 formbuilder_PostRequest( ) ..\alternate_action.php:81
    12 0.9247 35735408 parse_url ( )

  5. nambo
    Member
    Posted 2 years ago #

    I found the solution to my server warning. There is an error in line 150 of the file alternate_action.php:

    $url = parse_url($url);
    Change it to:
    $url = parse_rul($url1);
    and change line 139 to:
    function formbuilder_PostRequest($url1, $referer, $_data) {
    The warning is now gone.

    My new problem is that after the alternate code is called, the page is reloaded but it does not appear properly. The page format is screwed up. Any suggestions on where to look to fix this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags