JQuery Dropdown, 2 options for registration

Discussion in 'Templates customization' started by slinky, Nov 9, 2010.

  1. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    I've created a really nice jquery dropdown for two different kinds of users on my site. Let's call them entertainers and clients. I have a jquery dropdown that users are asked if they are a magician or the audience. Based upon the answer you get two different sets of signup.html forms (essentially the audience has the additional questions part removed so it's a shorter login.)

    The problem is that even if you use jquery to hide code, amember still thinks it's there because it is, just hidden. I want it not to be used and not to appear even to amember. This seems to require the use of an IF statement. I'm not sure how to do this. THe jquery basically allows the user to choose either "audience" or "magician" and then the appropriate div is selected and either hidden or dropped own:

    <div class="hide" id="hide1">

    Thats for the first option:

    <div class="hide" id="hide2">

    This is the second. I guess I need an if statement that states if the hide1 is selected, show the code. Same with hide2. Any ideas? It looks great except when you try to submit, it accuses you have having a whole lot of forms not working and a captcha code not entered (because two capcha images are probably showing too.....
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Yes you right it does not work because both forms are included on the page by default so there will be conflicts. The simplest solution as I see it is to make one div for content and load it on the fly using AJAX.
    You will need to create simplified signup forms as well(to be loaded into div)
  3. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Yeah... depressing.. I tried everything and not working so far, even ajax. I was thinking that perhaps I could load the html generated by the signup page but it doesn't look like the submit is working. I had an idea to use iframes and that didn't work either. The html and forms are pregenerated but hitting the submit button didn't do anything.

    Hopefully we can figure this out. I just need a different signup form for two different people, that simple. Didn't want to use a stock html click and go to another html page but that seems to be the case. Not sure why the iframe isn't working but would love to have ideas from anyone else trying the same thing.
  4. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Nailed it!!!! Created a second template for signup and used that (with some editing) in an iframe to load the signup form I want. Amazing... it works, love it.
  5. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @slinky: awesome. love to see a link to the finished product.
  6. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    I've actually opted out of the iframe and now have a two step that has four choices and then you're presented with a second page with all the options. It's not much different and gets rid of all the problems with javascript, etc.

    The issue with iframes are that there is no way to autosize the new page, which I think is ridiculous but it is what it is. My free quick membership provides a lot of white space and for different vendors the length varies.

    This took me a very long time but everything works perfectly now. My goal was to have a good understanding of my users at registration time since many will never answer questions later. Asking one or two questions at registration can provide a signficant insight.

Share This Page