Skip Navigation

[Assigned] Two relationship forms interfering

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)

This topic contains 15 replies, has 1 voice.

Last updated by nicolaS-3 10 hours, 10 minutes ago.

Assisted by: Minesh.

Author
Posts
#2846260
rel-form.jpg

Hi all,
I have two different relationship forms on the same page (see picture). The first one has a parent selection, the second doesn't need it. The first one works perfectly, the second one would also, but the parent selection dropbox of the first one appears also on the other form preventing it to work because the selection is mandatory. If I delete the dropdown in the console also the second form works fine. I think this happens because Toolset generates the forms with the same code and I cannot hide the second with CSS because also the first one disappears. Is there anything I can do to work around this issue ? thanks
Regards
Nicola

#2846347

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where you added both the relationship forms and admin access details. Please share what parent dropdown you want to remove.

Once I review your current structure I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2846381

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share front-end user access details that I can use to login and for that user band and musician posts are configured.

I have set the next reply to private which means only you and I have access to it.

#2846386

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

On the following page - I've unhide the parent select boxes:
=> hidden link

And I tried to set the child with second box (musician) and it works.

Do you want to hide the parent selects from both the boxes?

#2846389

Minesh,
the parent select boxes must be hidden in both forms, I need to remove the select box "Seleziona una b ..." from the form on the right

#2846394

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

But if you remove the child select field "Seleziona una b ..." from the form on the right" form the right form - what is the meaning of that form?

#2846397

That form creates the relationship between event and profile and has nothing to do with the b.... If in the browser you delete that select field the button works and the relationship is regularly created. That select is not needed because it belongs to the other form on the left only

#2846814

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

What is your exact need - you want to have both forms but only display the child select fields with both the form and hide/remove the parent select field with both the form - is that correct?

#2846843

Minesh,
Parent (event9 to stay hidden for both forms. The form on the left is for a many to many relationship, so user needs to select one child from many (dropdown box). The form on the right doesn't need any selection because there is only one profile to associate (current user profile). The dropdown here is a copy of the one on the left form, just find the way to remove it, if you manage to the button on the right will work
thanks

#2847318

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The form on right - what purpose you want to use - what post you want to connect and what should be the default profile for the right form.

You said - " The form on the right doesn't need any selection because there is only one profile to associate (current user profile)."

But when I checked the post-relatoionship - "Events Bands" and "Events Profiles" are both many-to-many.
- hidden link

I do not see any other way to stop triggering the relationship form field. Maybe its better idea for you to put forms in separate page.

#2847513

Could you please open the private mode ? thanks

#2847514

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I have set the next reply to private which means only you and I have access to it.

#2847535

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

No - I suggest you create a two different page. In one page add the band relationship form and on another page padd the profile relationship form.

And add two anchor links when user click on APPLY AS A BAND it should redirect to the page where you added the band relationship form and when user click on APPLY AS A MUSICIAN link user should redirected to page where ou added the profile relationship form.

#2847664

Hello Minesh,
meanwhile I was setting up two pages as you prescribed, I made a further test in the original content template deleting the event-bands relationship form (left) and I could see that the other form still shows the event-band select even though now is the only form in the content template. This means that the issue is not related to the presence of two forms on the same content template, but it's probably an issue generated by the fact that there are two relationships with the same parent, the event.

It looks like Toolset generates the dropdown from the first relationship he finds in the db regardless of which one is selected when creating the form. I have also created a new vanilla form with the same structure and also that one shows the band select for no reason. Please also note that removing the band select from the page code and clicking on the button the form SEEMS to generate the relationhip (the feedback message appears), but the post relationship is NOT created actually.

Reading the code of the form in the editor, I don't see any indication about which child to use for the relationship even though the relationship is selected at the top of the page. I also referred to the [cred-relationship-role] documentation to check if it’s possible to specify the child in a parameter, but no.
Please try to replicate this issue in your vanilla environment, because it could be a bug and let me know
thanks

#2847670

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please create two pages and add your both forms to it and share the link of those pages and then I will guide you how to set the parent event to both of those pages.