Forum Replies Created
-
AuthorPosts
-
Yasmine
ParticipantOh I see - it needed to be 'from'. Sorry about that.
The only issue now is that is right at the bottom of the form in a position that does not make sense and does not have a title - so does not match how I formatted the rest of the form. How can I fix this?
Thank you.
Yasmine
ParticipantAnd when I add it in the correct way that you suggest:
'[mb_user_profile_register mb_frontend_form id="university_user_relationships_to" label_submit="Add new" confirmation="Your academic has been added" role="contributor" show_if_user_can="create_users" email_as_username='true' email_confirmation="false" password_strength="false" ]'
At the bottom, it does not link to selecting the university post. It just lets you select a different user - not university.
I am unable to use pastebin to share a screenshot.
Yasmine
ParticipantOh but I want to add the relationship field into the profile register. As it is a university, I want to attach the university via a relationship post when we register a new user..
So in the first message, the code I shared was to add to edit this:
function add_more_registration_fields($fields) { $first_fields = [ ... [Yasmine
ParticipantHi Peter,
Ok so that means I made it :
[mb_frontend_form id="mb_user_profile_register,university_user_relationships_to" label_submit="Add new" confirmation="Your academic has been added" role="contributor" show_if_user_can="create_users" email_as_username='true' email_confirmation="false" password_strength="false" ]But with this, all I get is a select already created user box. Whereas...
[mb_user_profile_register label_submit="Add new" confirmation="Your academic has been added" role="contributor" show_if_user_can="create_users" email_as_username='true' email_confirmation="false" password_strength="false" ]Rendered the correct form and with all my added fields, which I added via a php snippet. Only the relationship not working.
I removed the relationship field (that I shared in my last code) from the php snippet
And I also tried _relationship_from - but in that case, nothing rendered.
What am I now doing wrong?
Many thanks,
YasmineYasmine
Participantuniversity_user is the name of the relationship ID
Yasmine
ParticipantThanks, it was Relavanssi...
I will try work out how to fix.
Yasmine
ParticipantGreat, thank you!
Yasmine
ParticipantAnd I don't know how to reproduce. I can only see the issue in php_errorlog and do not know yet what issue it is reporting on
Yasmine
ParticipantSure, here are the logs from today: https://pastebin.com/cn0efYPN
Yasmine
ParticipantThank you Peter! And sorry- I missed that you'd replied.
Does your plugin Slim SEO support this feature?
Yasmine
ParticipantOh niceee, thank you for the suggestion 🙂
December 16, 2022 at 3:49 PM in reply to: My code stopped working to get user ID of a user field #39849Yasmine
ParticipantHi Peter,
Its still not working. Do you know what else I can try?
December 12, 2022 at 6:02 PM in reply to: My code stopped working to get user ID of a user field #39709Yasmine
ParticipantHi Peter,
I do not get anything with a print_r on a new template using a test post. But it is definitely the correct ID (with prefix included) and there is definitely a value in the test post to output. No error messages when trying to get the value.
But I use elementor as my page builder, with the elementor dynamic conditions tool, I can successfully output the test post value. Does that use the
rwmb_meta()?I also checked in my code with a
wp_mail(...sprintf())and all the other fields had a value except this one and another number field where the value was also an integer.Many thanks,
YasmineNovember 25, 2022 at 11:42 PM in reply to: ✅Adding a custom field as a link to an elementor button #39332Yasmine
ParticipantHey - I never got it working with merging the mailto: in output. But I got it working by just getting the user email with the shortcode and then in the page builder when adding the shortcode link, click advanced and add "mailto:" beforehand 🙂
Yasmine
ParticipantUpdate:
Hi Peter,With the following code, I have got the avatar and photo to show within the metabox group on elementor. The first value correctly populates the name and avatar.
//For display_name add_shortcode("former_team_member_get_name", function (){ global $post; $ftm_post_type = get_post_type($post->ID); if(is_singular() && "team" == $ftm_post_type) { $group_id = rwmb_meta( 'archived_team_users_group','',$post->ID); foreach ($group_id as $x){ $f_user_id = $group_id['former_team_member'] ?? ''; foreach ($f_user_id as $user){ $ff_user = get_usermeta($user); } return sprintf($ff_user[1]); }}}); //For the avatar add_shortcode("former_team_member_get_avatar", function (){ global $post; $ftm_post_type = get_post_type($post->ID); if(is_singular() && "team" == $ftm_post_type) { $group_id = rwmb_meta( 'archived_team_users_group','',$post->ID); foreach ($group_id as $x){ $f_user_id = $group_id['former_team_member'] ?? ''; foreach ($f_user_id as $user){ $profile_pic = get_avatar_url($user); $main_html_markup = "<img src='$profile_pic'>"; }} return $main_html_markup; }});However, when I try to use the metabox group field within a template that has values, it shows as blank.
How do I populate the metabox group correctly with shortcodes that then loop to show all the post values on a template?
-
AuthorPosts