Form Builder Software That Writes Cookies Based On User Selections

3 replies
I have a 10 question multi-choice form.

I would like to display some content and hide other content based on the form responses on the thank you page.

The only way I can imagine doing that is with cookies, then using javascript to display/hide content based on the cookies.

Problem:

I can't find any form builder software that writes cookies for later retrieval.

Anyone know of something like this?
#based #builder #cookies #form #selections #software #user #writes
  • Profile picture of the author Brandon Tanner
    No cookies or Javascript necessary to do that, because all of the form data can be passed via POST to the thankyou page, then you can simply use PHP to echo out the CSS styles to show or hide the div's.

    1) On your form page, just create a form with all of the different questions and answer choices, then submit the form like normal. Form example...

    PHP Tutorial - Forms

    2) Then on the thankyou page (this page should have a .php extension), put a block of PHP code in the <head> section that grabs the submitted data from the previous page, then uses conditional statements to figure out the selected answers to each of your multiple choice questions. Conditional statement example...

    PHP Tutorial - Elseif

    3) Inside each conditional statement, echo out whatever styles you want in order to show / hide div's on that page. For example...

    echo "<style>#DivToHide {visibility: hidden;}</style>";

    You could also use Javascript / jQuery to do this. In fact, if you have a lot of different div's to show/hide, then jQuery would probably be the most efficient method. But the above PHP / CSS example should work just fine.
    Signature

    {{ DiscussionBoard.errors[8103213].message }}
  • Profile picture of the author Michael71
    I would also add a display:none to the CSS... just in case
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[8103614].message }}
  • Profile picture of the author jasonthewebmaster
    Banned
    Form logic can do that in form builders like wufoo or warriorforms.com (check my signature)
    {{ DiscussionBoard.errors[9473875].message }}

Trending Topics