Home Forums Plugin Support WP User Frontend Pro Bootstrap and WP-user forms

This topic is: resolved

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Tareq Hasan 5 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13711

    ced
    Participant
    Post count: 32

    Hi,

    Using bootstrap, how can I add the needed classes and remove yours in the “add new post form” ? An override ? A filter function ?
    What I have :

    <li class="wpuf-el one">
    <div class="wpuf-label">
    <label for="wpuf-one">
    Select
    <span class="required">*</span>
    </label>
    </div>
    <div class="wpuf-fields">...

    What I need :

    <div class="form-group">
    <label for="thelabel">My label</label>
    <input type="text" name="name" id="name" class="input form-control" value="value" placeholder="theplaceholder" />
    </div>

    EDIT:
    Adding the class to the field in wp form doesn't work because it add it to the li and not to the input field.

    Reading render-form.php, it looks like I need to filter all fields.
    Do you have an idea on how to ? Can you share an example ?

    #13714

    Tareq Hasan
    Keymaster
    Post count: 2831

    There is no other way except editing the plugin code. But I wouldn't suggest doing that as you'll lose the changes if any plugin update comes.

    It'll be better to add custom CSS to your theme and style the form.

    #13715

    ced
    Participant
    Post count: 32

    Is there any filter action like in wordpress ? Something like:

    add_filter('wp_nav_menu_main_items','login_function', 10, 2);
    	function login_function( $nav, $args ) {
    		return $nav.'<li class="menu-item menu-item-login"><a class="btn btn-success" href="#login" role="button" data-toggle="modal">Login</a></li>';
    			return $nav;
    		   }
    		return $nav;
    	}
    #13726

    Tareq Hasan
    Keymaster
    Post count: 2831
Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Bootstrap and WP-user forms’ is closed to new replies.