Passer la navigation

[Résolu] Loading fields in relationship

This support ticket is created Il y a 4 years, 4 months. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Minesh Il y a 4 years, 4 months.

Assisté par: Minesh.

Auteur
Publications
#2262277

I have 2 custom post types
Referral
Members

I have a relationship; Members Referrals which is one-to-many.
1 Member can be assigned to one Referral
Infinite Referrals can be assigned to one Member

In my form is a field:
<div class="form-group">
<label for="%%FORM_ID%%_@member-referral.parent">[cred_i18n name='@member-referral.parent-label']Members Referrals[/cred_i18n]</label>
[cred_field field='@member-referral.parent' class='form-control' output='bootstrap' select_text='--- not set ---' required='true']
</div>

Which populates the desired Member assigned to the form.
However, I have a field in Referrals name MembersEmail. I would like to populate this field with the corresponding email of the selected Member.

What is the preferred way of doing this? How can i Query the Members post type based on the selected Member and return the email?

Thanks

#2262799

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no such feature available to display the email when you select one of the parent member.

However - if your goal is to save the parent email address when you save the form that will be possible using the Toolset form hook.