• If you use the alt action url…the url gets processed, but any output form the curled document gets echoed at the very top of the html (all wrong) and the url itself gets displayed in the thank you/confirmation message.

    To fix…

    Edit formbuilder/modules/alternate_action.php

    Go to function formbuilder_process_alternate_action

    At the bottom it has:

    echo “\n<div class=’formBuilderSuccess’>” . decode_html_entities($thankyoutext, ENT_NOQUOTES, get_option(‘blog_charset’)) . “</div>”;

    return(false);

    It should be:

    return “\n<div class=’formBuilderSuccess’>” . decode_html_entities($thankyoutext, ENT_NOQUOTES, get_option(‘blog_charset’)) . “</div>”;

    Important as it is too early to echo any content! It will go above the template.

    Then edit formbuilder/php/formbuilder_processing.inc.php

    Go down to the comment:

    //Check if an alternate form processing system is used

    After:

    $msg = $processor_funcname($form, $allFields);

    Make sure these lines follow:

    $func_run = true;
    $altrun = true;

    Then go down to this line:

    elseif($msg)
    { // Only shown if the function returned some sort of failure.
    $formDisplay = “\n<div class=’formBuilderFailure’><h4>” . $formBuilderTextStrings[‘failed’] . “</h4><p>$msg</p></div>$
    }

    And sneak another elseif before this:

    elseif($altrun && $msg) {$formDisplay = “\n$msg;}

    I’m sure there are more eloquent ways to do this…but this does the trick.

    http://ww.wp.xz.cn/extend/plugins/formbuilder/

The topic ‘Formbuilder alt action and bug’ is closed to new replies.