Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 77 total)
  • Author
    Posts
  • Content PilotContent Pilot
    Participant

    Ahn, this is very close. Thanks for adding it. It is working well for the first password field but does not use the Mismatch flag when working with two password fields. On my end, I have 2 password fields and put in matching strong passwords then added a few extra characters. The meter did not change to inform me that they are mismatched.

    in reply to: [MB User Profile] Show password meter on registration form #13218
    Content PilotContent Pilot
    Participant

    I followed this tutorial on how to attach the strength meter to the form.

    https://code.tutsplus.com/articles/using-the-included-password-strength-meter-script-in-wordpress--wp-34736

    I also add this function to echo the span for the JS to bind to.

    add_action( 'rwmb_profile_before_submit_button', 'password_strength_meter_field' );
    function password_strength_meter_field( $config ) {
      if ( 'register-form' === $config['form_id'] ) {
        echo '<span id="password-strength"></span>';
      }
    }
    Content PilotContent Pilot
    Participant

    For anybody else that wants this functionality, here is what I did.

    Set the user_id as a transient in the database after the user object is created.

    
    add_action( 'rwmb_profile_after_save_user', 'set_user_id_as_transient', 10 ,1 ); 
    function set_user_id_as_transient( $object ) {
         set_transient( 'user_id', $object->user_id, HOUR_IN_SECONDS );
    }
    

    Then modify the form submission with the transient data.

    
    add_filter( 'rwmb_frontend_insert_post_data', 'insert_user_id', 10, 2 );
    function insert_user_id( $data, $config ) {
    
        $user_id = get_transient( 'user_id' );
    
        if ( false !== $user_id ) {
             $data['post_author'] = $user_id;
        }
    
        return $data;
    
    }
    

    Ahn, please mark as complete.

    in reply to: [MB User Profile] Show password meter on registration form #13211
    Content PilotContent Pilot
    Participant

    Any thoughts on this Ahn?

    in reply to: Registration Form Not Showing Anything #13148
    Content PilotContent Pilot
    Participant

    Hi Ahn, any update on why the default user registration form is not showing by default when inserting the shortcode?

    in reply to: Registration Form Not Showing Anything #13121
    Content PilotContent Pilot
    Participant

    I am also seeing this bug, but not at all associated with AIO.

    Installed frontend submission and user profile extensions via Composer and not able to see default registration form when inserting shortcode as shown above.

    in reply to: Drag and drop order reset without consent #12685
    Content PilotContent Pilot
    Participant

    Thanks Doug. I did the same.

    Ahn, ran similar tests and it looks great. Please push the updates.

    Thanks for everything! This is a huge lifesaver for my clients.

    in reply to: Drag and drop order reset without consent #12682
    Content PilotContent Pilot
    Participant

    Doug, where are you finding the new package?

    in reply to: Drag and drop order reset without consent #12681
    Content PilotContent Pilot
    Participant

    Ahn,

    These videos look great. Looks like you have the defaults ort order in the admin set to use the new database columns? I like this being the default. Once it is set, they should not change.

    I can't seem to find the github repo for the dev branch. All I see is master and check_relationship.

    in reply to: Drag and drop order reset without consent #12608
    Content PilotContent Pilot
    Participant

    Nice one Doug. I am seeing the same thing.

    Looks like the storage interface doesn't have the db param.

    I think Anh removed the parameter in favor of the direct reference of `global wpdb'.

    The storage handler should do the same global reference probably.

    in reply to: Drag and drop order reset without consent #12552
    Content PilotContent Pilot
    Participant

    Went to test this and I cannot save a relationship value.

    I installed a clean version of 4.9.8 and also 5.0 to test on with the same results. The database structure was created properly and happy to see the extra columns. Here are the steps I took to test.

    1. Installed Metabox from wp.org repo.
    2. Installed MB Relationships from Github repo.
    3. Create plugin to instantiate relationship field. Copied code from documentation.
    4. Created 1 page and 1 post.
    5. Set relationship with Post Object select field.
    6. Select Publish.

    On save, the relationship fields get cleared out. Reset back to a single empty value.

    Am I missing something on my setup? Have you tested on a fresh install?

    in reply to: Show/hide metabox based on user permissions #12412
    Content PilotContent Pilot
    Participant

    Got it! Thank you.

    Content PilotContent Pilot
    Participant

    After I found all object fields for a post object. I looped through each field and used this conditional to make sure I was grabbing a relationship field.

    if ( 'post' === $field['type'] && strpos( $field['id'], '_to' ) !== false && strpos( $field['id'], '_from' ) !== false )

    Content PilotContent Pilot
    Participant

    I really need this functionality so I wrote a function that runs on save_post. Hopefully is helps somebody else.

    https://ghostbin.com/paste/d92ys

    Content PilotContent Pilot
    Participant

    I am writing my own endpoint.

    But i don't need help with the rest api. I need a field setting to be added to the Relationship field so I can distinguish it from other fields. I am using rwmb_get_object_fields to get all fields for an object then trying to single out the relationship fields with an in_array of some sorts. I can do this just fine for groups fields since there is a field setting type => group in that array. I would like something similar in the Relationship field. Just one little key value pair since the field_type key is already taken.

Viewing 15 posts - 46 through 60 (of 77 total)