Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorlifestyle
    • CommentTimeNov 16th 2009
     
    Has anyone got a solid example (step by step, assuming the user knows PHP and MYSQL) of how to use the HTTP Post Connector to send variables to a script I host so I can stick the data in my database? I don't get what I need to to have in my script and how I answer back to the Form Assembly mechanism when I have saved my data and am ready to complete the process...

    Basically, I LOVE form assembly for the simple approach to complex forms but it is imperative that I capture the form data in my own DB and I just cannot seem to get all the pieces of the puzzle from the docs and this forum.

    Anyone with some experience and a sample script would gain Karma by sharing with me and others with this challenge. I pledge to post a script here when/if I get to understand how this works and can get my script to work.
    • CommentAuthordbuschho
    • CommentTimeNov 16th 2009
     
    Hello,

    There is no answer back to FormAssembly. It is a completely one-way process, other than FA storing the response the POST system gives in the logs and as a variable when POST is set to background.

    It's best to start simply so you can see how your data will be exported.

    Just setup a php var dump script:

    <?php

    var_dump($_POST);

    ?>

    Point your connector to it, and see how your test data looks in the connector log. Once you've done that you'll be in a better position to tell us what you're looking for, and what problems you are having.

    Happy to help.
    • CommentAuthorlifestyle
    • CommentTimeNov 16th 2009 edited
     
    Haha... that is exactly what I did last night to start the process... I see how simple this is now... my existing form processor will do just fine as soon as I map the new post variables into it... sweet.

    If the path is one-way,what impact does making the process 'interactive' have? When would I use that?

    I trying to keep my visitors on the i-framed page at all times, I don't want them to leave for any reason during the form processing... The form is actually in a tabbed interface so I really don't want them leaving the tab either... I just want the typical AJAX feel for the validation and success message to all happen in the <div>

    Is this do-able? (Right now my 'thanks for the e-mail' seems to be rendered on a new blank page (taking the visitor off the form and the form page)
    • CommentAuthordbuschho
    • CommentTimeNov 16th 2009
     
    Switching the setting to interactive:
    'Interactive' mode will also hide any errors from the respondent, but will wait for the remote script to complete before taking the user to the thank-you page/url. If the remote script is slow, your respondents will experience a noticeable delay between hitting 'submit' and seeing the 'thank-you' page. 'Interactive' mode will also create the server alias %%TFA_POST%% containing the remote script's response.

    So it will populate %%TFA_POST%% with whatever text your response script returns.

    As an example, a FA user has a script that takes the posted data, does some processing on the data, and returns back a one-time token to identify the user on their site. After the POST connector is run, %%TFA_POST%% now has that token, and the respondent is shown a thank you page with the token in a the URL of the hyperlink. The respondent follows the link, and the FA user's system logs the person in (*important* and expires the token *important*).

    That being said, there is no way to stop the POST connector from taking the user on to the thank-you page/url.

    If your form is in an IFrame then (baring other javascript code) there is no way they would be taken to a different page in the parent page.
    • CommentAuthorfilser8
    • CommentTimeSep 8th 2010
     
    I'm using the HTTP connector in interactive mode and I process the form results in a PHP script that returns a string "TRUE" or "FALSE" depending on given answers.
    I then set the respons url to http://xxx/registerconfirmation.php?answer=TFA_POST, as I want my thankyou page to show a message depending on the result of my script process.

    I found that using %%TFA_POST%% this way doen't work, but by omitting the %-signs, it works fine.
    But if you want to integrate the respons in your notification e-mail, then you should use %%TFA_Post%% with the %-signs.