Sauter la navigation

[Résolu] Auto assignment user cred relationship form

This support ticket is created Il y a 5 années et 2 mois. 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 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Minesh Il y a 5 années et 2 mois.

Assisté par: Minesh.

Auteur
Publications
#1415999

Pat

Hello,

I have 2 postypes (evenement) and (membre) and I have created a multi to multi relationship between them.
Now, I want to insert in the "evenement" page a button to subscribe. So, I need to assign "evenement" as the current page and "membre" as the current loggedin user.

How can I do this?
Regards
Pat

#1416167

Minesh
Supporter

Les langues: Anglais (English )

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

Hello Pat,

The only way to add the relationship form is we need to hack the relationship form a bit - I'm sharing the following workaroud:

Please check how relationship form is buid here:
=> lien caché

And its added as:

[cred-relationship-form form='inscription-evenement'  child_item='$current']

Now, if you submit the form - do you see correct posts are connected:
=> lien caché