WordPress.org

Ready to get started?Download WordPress

Forums

WP-Members
[resolved] Wrapping each label and input combined (3 posts)

  1. Luke Etheridge
    Member
    Posted 7 months ago #

    Hi Chad,

    Me again! Hope you're well?

    I'm once again using your fantastic plugin on a project and have a number of questions.

    First is - on the reg form is there a way to wrap each label and input (or div.div_text) so that they're within their own div? I'm basically trying to float each label and input left so that they form a two column form like this...

    <label1>    <label2>
    <input1>    <input2>
    
    <label3>    <label4>
    <input3>    <input4>

    Second is - on the reg for is there a way of splitting the fields and have titles in-between certain ones? I'm basically wanting to segregate the last two fields of the reg form with their own little title and introduction (these fields will be optional and need a little bit of explanation).

    ---

    I know you're a busy man Chad but if you could get back to me asap with some answers it would be very appreciative.

    Thanks, Luke.

    http://wordpress.org/plugins/wp-members/

  2. Luke Etheridge
    Member
    Posted 7 months ago #

  3. Chad Butler
    Member
    Plugin Author

    Posted 7 months ago #

    If you are going to change HTML markup, the way to do that is using a filter. In this case, the wpmem_register_form filter, which is documented here: http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_register_form/

    I'll be honest, to filter the form to wrap each label and input with its own div is possible, but it would take some complicated search/replace (str_replace) functions.

    This type of customization will be much easier when 2.9 is released. There will be more granular control over the form building process. There will be more filters available during the form build, and also a number of default wrappers/tags that will be able to be manipulated with a more simple filter. There's more information on the status of this project and where it is going here: http://rocketgeek.com/release-announcements/wp-members-2-9-project/ It's important to note that this is still early development so elements discussed there are subject to change.

Reply

You must log in to post.

About this Plugin

About this Topic