PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Is it possible to hide a form until the title is clicked on?

  1. Hi,

    I want to put a mailchimp subscription form into my footer area but I don't want all the email and name fields to be shown until they've clicked on the big "Subscribe to my newsletter" heading.

    Have a look at a WIP site, http://www.goal-rush.co.uk if you want to see what i mean. I've got a top footer widget area I'd like to fill with the gravity forms widget, using a mailchimp subscription form I made using the API keys etc.

    However, if I have the email and name fields showing up all the time the footer looks a right mess. What I'd like is for the heading (can be the Form Title) to be shown, then when they click on it, it animates down to show the rest of the fields, like it does with the conditional logic.

    Is this possible?

    The only way I can think to do it is have a checkbox to say, yeah ok, and I hack the CSS to move it to the right of the text. when they tick it, the email and name fields are shown based on conditional logic, and the footer slides down to show them.

    Is there something more elegant I can do?

    Cheers
    Lee

    Posted 13 years ago on Sunday March 6, 2011 | Permalink
  2. Right your own code to do this. Right your own title that then uses some code to show/hide a div. Inside that div output the form. Turn the Form Title option off on the shortcode. You provide the form title with your own custom code, and implement the show/hide capability using your own custom code.

    Posted 13 years ago on Monday March 7, 2011 | Permalink
  3. Thanks for the reply Carl, I thought I'd have to do something like that. I'm no jQuery guru, but I'll see what I can come up with.

    Cheers
    Lee

    Posted 13 years ago on Monday March 7, 2011 | Permalink
  4. This should get you started in the right direction.

    http://api.jquery.com/slideToggle/

    Posted 13 years ago on Monday March 7, 2011 | Permalink