Skip Navigation

[Resolved] Use custom fields ( chakbox and radio) as categories or vice versa

This support ticket is created 4 years, 4 months ago. 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1711691

Tell us what you are trying to do?

I need to create an RFG
with different categories

what is the best way to work with?

1) create categories for a certain custom post type and add this to a form? but how then create RFGs in a form with categories?

2) create RFGs as custom fields ( and there within radio and checkbox fields) and make categories out of these ? how would i do that?

why do I think I need this checkbox fields as categories?
cause I need to also create a search , based on these ( either) custom fields or categories
and I need to create archives based on the described fields as well

Is there any documentation that you are following?
not now

Is there a similar example that we can see?
not now

What is the link to your site?
schpinn.at - still hidden under maintenance

#1711871

Hello, it might be simpler to use a custom post type instead of using a repeatable field group. You can apply categories to your custom post type and create archives automatically for the custom post type. Create a one-to-many post relationship between the parent post type and the new custom post type, so the new custom post type is a child of the parent post type. Then you can manage child posts from the parent post editor screen. This would allow you to accomplish the same requirements without any custom code. It is not currently possible to assign taxonomies to a RFG, and it is not possible to create archives for custom fields automatically. Is there a reason why you want to use RFG instead of a child post type?

#1711885

Dear Christian,
thanks for yor fast reply,

I was not precise enough, sorry for that

I need users to fill in FORMS

let's say
we have 3 professions for 8 job-categories

Professions : ( let them choose only one)
Pro
Student
Teacher

Job-Categories: ( let them choose more than one)
Singer
Dancer
Actor
Director
Costume-Designer
Make-Up-Designer
Hairdresser
Sound-Designer

So they can choose ONE Profession and some Job Categories
if they need ANOTHER Profession in other JOB-Categories, I need to repeat that

So I need to build Forms with repeatable fields groups

after the user filled out the form they should see their entries in a custom post

Or is this possible with child-posts?

Greets, Eva

#1711951

In Toolset Forms it is only possible to add or edit one post OR one row of a Repeatable Field Group (RFG). It is not possible to create one Form that edits or creates more than one row of a RFG. Each row must be added or edited individually, separate from its parent post. It is the same with child posts - only one child post can be created or edited in one Form. You could do something similar in Toolset, let me explain. You could create a Page, let's say it is called "My Jobs". In that Page, you could start by showing links to create posts:
(Create Pro)
(Create Teacher)
(Create Student)

When they click "Create Pro", they are sent to a Create Post Form where they can choose from all the different categories to create a Pro post. Let's say they choose Singer and Dancer categories. When they return to the My Jobs page, now they see:
Pro: Singer, Dancer (Edit Pro) (Delete Pro)
(Create Teacher)
(Create Student)

So now they can edit the Pro post, or create a Teacher post, or create a Student post. Eventually let's say they create all 3 Jobs and on My Jobs they will then see:
Pro: Singer, Dancer (Edit Pro) (Delete Pro)
Teacher: Director, Dancer, Hairdresser (Edit Teacher) (Delete Teacher)
Student: Singer, Dancer, Director, Actor, Costume-Designer (Edit Student) (Delete Student)

If they click "Edit" for any Job, they will be taken to a Form where they can edit that individual Job and choose different categories if necessary. You can have archives for each category, and you can have archives for Pro/Teacher/Student. If you want, you could make Pro/Teacher/Student different custom post types and have separate archives for each level.

Would this work for your site?

#1712021

My issue is resolved now. Thank you!

This seems to be a nice way I would never have thought of
great support!

Thank you so much

#1712025

sorry one more question left for this case:

when i create a My Jobs page
and a Create Post Form page

is it also possible to show both using blocks on ONE PAGE?

sorry for reopening again 🙁

greets

#1712773

Yes, you can show a Create Post Form in the same Page where you display My Jobs. You could use a View to determine whether or not the post has already been created. If the post has not been created, display the Form. If the post has been created, display the Edit and Delete links. See FAQ #1 here for information about how to achieve this in Classic Views: https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/
If you need assistance setting this up in a View created in the Block Editor instead of classic Views, feel free to open a new ticket and ask for help.

#1712877

Great support...
thank you so much

My issue is resolved now. Thank you!