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.

Manually build a form inside page template

  1. Andrew Munro
    Member

    What I'm wanting to do is manually build a form inside a WP page template. I want to do this so 1. I can use utilise html5 placeholder (I realise GF does not support this yet)
    2. Make the forms html a lot simpler (without all the classes, li's and such)

    It's just a very simple form and I see if I copy and paste the raw html after building it (from firebug) it works but I don't get validation and the thanks message. How can I manually add the validation and thanks message back in?

    Posted 12 years ago on Sunday April 8, 2012 | Permalink
  2. Andrew Munro
    Member

    still not having any luck, any ideas?

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  3. kyle
    Member

    Personally, I'd just use a standard form, and then add placeholders using JavaScript if you really feel you need them. It would be a lot less work, and less error prone, I'm sure.

    Tons of results for jquery add placeholder on google.

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  4. Andrew Munro
    Member

    Thanks, yeah I've seen a few but it bugs me that if javascript was turned off on the user's browser, there would be no placeholders, and no text at all, just blank input fields.

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  5. kyle
    Member

    Well you could have the labels show, and hide them w JavaScript. That way, if JavaScript is disabled they see the labels. If it isn't, they don't see them. Simple CSS like:

    .js label {display: none}

    And jquery like:

    jQuery(".gform_wrapper").addClass('.js');

    Posted 12 years ago on Friday April 13, 2012 | Permalink