Skip Navigation

[Gelöst] Edit Form Relationship form to show list of posts with tick box and not dropdown

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

The issue here is that the user wanted to convert their relationship fields to checkboxes on their frontend form.

Solution:

Unfortunately this isn't possible to do. The relationship frontend form fields can only be select fields.

This support ticket is created vor 3 Jahre, 1 Monat. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 Antworten, has 2 Stimmen.

Last updated by barryG-4 vor 3 Jahre, 1 Monat.

Assisted by: Shane.

Author
Artikel
#1995997

Tell us what you are trying to do?
Edit a Forms Relationship form currently with two dropdowns, to show one drop down to select a post type post to edit relationships for, and then to replace the second dropdown with a list of potential posts to relate to the one being edited. I've created a page showing exactly what I have got on an existing non WP site, what I've done so far with the current new site and what I'd like to do with photoshop mocks up to help explain it: hidden link

Is there any documentation that you are following? No.

Is there a similar example that we can see? Yes, there are screenshots included at the link above and below.

What is the link to your site?
hidden link

#1996611

Is the answer in amongst the code here which is the select tag for the Models drop down. Could it be changed somehow from select to a multi checkbox horizontal list?

<select id="cred_association_this-week-day-model_child" name="cred_association_this-week-day-model_child" style="" data-orderby="ID" data-order="DESC" data-author="" data-post_type="model" data-parsley-required="true" required="required" class="cred_association_select_role js-cred_association_select_role cred_association_this-week-day-model_child wpcf-form-select form-select select">
</select>

#1996613

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Barry,

Thank you for getting in touch.

Unfortunately no this won't be possible, you aren't able to change the field type of the Post Relationship field.

Only the select2 field can be used as the relationship fields.

Thanks,
Shane

#1996619

Hi Shane,

Thank you for explaining that. Using the current set up with the two drops downs it's possible to add one model to a day one at a time really slowly and painfully BUT how can one be removed???? Surely there's a way of editing all the models related to the day by using the form. Is there something simple I'm missing? It's one way traffic, I can add but I can't edit and remove a relationship link sign this form so is that possible?

Many thanks,
Barry.

#1996661

Hi Shane, is there any other way you can suggest that I can set up a front end edit page for my client to choose a day (custom post type post) and from that one page add or remove easily multiple models (the other custom post type post in a many to many relationship)?

Many thanks,
Barry.

#1996693

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

delete relationship.PNG

Hi Barry,

Using the current set up with the two drops downs it's possible to add one model to a day one at a time really slowly and painfully BUT how can one be removed???
Yes you can remove the relationship from the frontend form. To do this there should be an X on the relationship form which allows you to clear the field and once the form is submitted with the field cleared then the post will be disconnected from that relationship. See Screenshot.

Surely there's a way of editing all the models related to the day by using the form.

Are you referring to editing all the Child posts that are related to a parent in bulk ?

It's one way traffic, I can add but I can't edit and remove a relationship link sign this form so is that possible?

Are you saying here that you're not able to delete the relationship between the posts from the frontend ?

is there any other way you can suggest that I can set up a front end edit page for my client to choose a day (custom post type post) and from that one page add or remove easily multiple models (the other custom post type post in a many to many relationship)?

Frontend editing/creating of relationships has to be done one at a time, currently we don't have a way to easily edit/create multiple relationship connections except through the backend.

Many to Many relationships will need to use a relationship form to do the editing/Creating of the relationship. Is it that you have a specific page for the clients to do this on that will contain only the relationship form ?

Please let me know if this helps.
Thanks,
Shane

#1997673

My issue is resolved now. Thank you!

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