Forum Replies Created
-
AuthorPosts
-
April 17, 2019 at 9:55 PM in reply to: ✅[MB User Profile] Show password meter on registration form #14193
Content Pilot
ParticipantAhn, 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.
February 6, 2019 at 12:09 AM in reply to: ✅[MB User Profile] Show password meter on registration form #13218Content Pilot
ParticipantI followed this tutorial on how to attach the strength meter to the form.
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>'; } }February 5, 2019 at 11:08 PM in reply to: ✅MB User Profile: Pass new user ID to subsequent form for post creation #13215Content Pilot
ParticipantFor 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.
February 5, 2019 at 10:25 PM in reply to: ✅[MB User Profile] Show password meter on registration form #13211Content Pilot
ParticipantAny thoughts on this Ahn?
Content Pilot
ParticipantHi Ahn, any update on why the default user registration form is not showing by default when inserting the shortcode?
Content Pilot
ParticipantI 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.
Content Pilot
ParticipantThanks 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.
Content Pilot
ParticipantDoug, where are you finding the new package?
Content Pilot
ParticipantAhn,
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
devbranch. All I see ismasterandcheck_relationship.Content Pilot
ParticipantNice 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.
Content Pilot
ParticipantWent 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.
- Installed Metabox from wp.org repo.
- Installed MB Relationships from Github repo.
- Create plugin to instantiate relationship field. Copied code from documentation.
- Created 1 page and 1 post.
- Set relationship with Post Object select field.
- 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?
Content Pilot
ParticipantGot it! Thank you.
November 24, 2018 at 12:49 AM in reply to: ✅Add meta data to field settings to identify as relationship field #12208Content Pilot
ParticipantAfter 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 )November 21, 2018 at 11:48 PM in reply to: ✅Taxonomy field not setting post term when inside Cloneable Group #12129Content Pilot
ParticipantI really need this functionality so I wrote a function that runs on save_post. Hopefully is helps somebody else.
November 20, 2018 at 10:06 AM in reply to: ✅Add meta data to field settings to identify as relationship field #12082Content Pilot
ParticipantI 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_fieldsto get all fields for an object then trying to single out the relationship fields with anin_arrayof some sorts. I can do this just fine for groups fields since there is a field settingtype => groupin that array. I would like something similar in the Relationship field. Just one little key value pair since thefield_typekey is already taken. -
AuthorPosts