ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Add class to {exp:member:login_form} possible?

February 12, 2008 9:49pm

Subscribe [3]
  • #1 / Feb 12, 2008 9:49pm

    stevefink

    136 posts

    Hi all,

    I’ve tried adding class=“foo” to {exp:member:login_form class="foo"} but unfortunately this doesn’t add the hook for me which I’m using to style an existing form.

    Is it possible to do this in another fashion?

    Thanks.

    /sf

  • #2 / Feb 13, 2008 1:51am

    Derek Jones

    7561 posts

    You can give it an id or name attribute, but not a class, at least, not without an extension using the form_declaration_return hook, and processing the form declaration on your own.  I don’t know what method you’re using for styling your existing form, but it should be rather trivial to get it to latch onto the member login form via an id, or even surrounding it with a div with a class or id to target.

  • #3 / Feb 13, 2008 2:02am

    stevefink

    136 posts

    Thank you for the reply Derek!

    Extension is certainly overkill—I’ll go forward with just wrapping my form with a container div where I can hook a class onto.

    Apologies for these inquiries which seem very rudimentary by nature .. I just want to make sure I’m doing things the ‘EE’ way. 😊

    Cheers,

    /sf

  • #4 / Sep 16, 2014 2:17am

    Mavarik

    3 posts

    You can give it an id or name attribute, but not a class, at least, not without an extension using the form_declaration_return hook, and processing the form declaration on your own.  I don’t know what method you’re using for styling your existing form, but it should be rather trivial to get it to latch onto the member login form via an id, or even surrounding it with a div with a class or id to target.

    Is this still the case? ... After searching for an answer, I found now form_class has been added to this, so it can be done now.

    Many thanks

     

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases