Skip Navigation

[Resolved] URGENT! Post Relationship Field NOT WORKING.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

Author
Posts
#2640761

Hi I have been trying to get something to work as expected for two full days.... Can you please watch this detailed video explaining my situation? Thank you! THIS Is SUPER URGENT.
hidden link

#2640889

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

From the video, I understand that you've two concerns:

1. The post relationships:

The 'post reference' field is a kind of a 'one-to-many' relationship because, at the back-end/database, it is stored in the same structure as the post-relationships.

For this reason, it is not a good idea to also use a post-reference field, when you've already created a 'many-to-many' relationship connection between the 'events' and 'registrations' post types.

You should keep only one of those relationship connections and delete the other.

2. The option to show 'related posts' in the view's content selection:

The option to show 'related {post-type-name}' shows depending on where you're creating/editing the view.

If you have a relationship between 'Events' and 'Registrations' and if you create a view in their single posts or single post content templates, then the option to show only 'related {post-type-name}' will be available. That is because the current post scope is one of the participating post types ( i.e. events or registrations ).

But, if you'll create a view in a regular 'Page', now the current post scope is not one of the participating post types. And in this case, the option to show only 'related {post-type-name}' won't be available.

I hope this helps and please let me know if you need further assistance.

regards,
Waqar

#2641431

Thank you for clearing that up. Ok so I changed the relationship to one event to many registrations. I removed the post lookup field and added the generated Post Relationship field to the form instead. That is working as expected. I then took it a step further and added this shortcode to the default value field in the form and it is working as expected. [wpv-post-id]. Since i Have the form on the Event it is creating the connection automatically, which is what i want to happen. Now I want to hide this field because I dont want the guests to be able to see it or change it. Can you help direct me in how i can hide the field and still have it work?

#2641659

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the update and glad I could help.

You can use custom CSS code to hide that relationship field. If you could share the link to the page where this form can be seen, I can help you with some example code.

#2642021

Sure here it is - hidden link

Also, i am working on this same form and trying to add a conditional group where when someone chooses "other" in the guest type, a message shows up with an additional field. I have created the Conditional group, and added the HTML field and the Other field. then in the conditions. Watch this quick video for both issue. hidden link

New threads created by Waqar and linked to this one are listed below:

https://toolset.com/forums/topic/split-form-conditional-group-for-the-checkboxes-type-field/

#2642657

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing these details.

I've created a separate ticket for your question about the conditional field group and will follow up on that shortly.
( ref: https://toolset.com/forums/topic/split-form-conditional-group-for-the-checkboxes-type-field/ )

To hide the relationship field ( 'Events Registrations' ), you can include the following custom CSS code in the form's CSS editor:
( You'll find it under the form fields section, in the form editor )


form[id^='cred_form_10602_'] label[for*='_event-registrationparent'],
form[id^='cred_form_10602_'] div[data-item_name*='event-registration.parent'] {
display: none;
}

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.