Skip Navigation

[Resolved] How to set up front-end entering of a CPT that has a group of repeating fields

This support ticket is created 4 years, 8 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.

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)

Tagged: 

This topic contains 17 replies, has 2 voices.

Last updated by Laura 4 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1318017
24291497_10155339045563003_3605739898001863064_o.jpg

Tell us what you are trying to do?
How to set up front-end entering of a CPT that also has a group of repeating fields....

Here's what I tried:
I have created a CPT( Jobs ) it has many fields and it also has one group of repeating fields (for rooms/locations).
then I created a post form for jobs and a post form for rooms. but I'm lost right now on how to get where I want to go.

I don't know if this is the correct way to do it for what I'm trying to do or not?

Basically what I want to end up with is.....
A way to be able to let our users login( I haven't created the user roles yet) and create a new job and enter data including data for an undetermined number of rooms(hence the repeating fields group). I just can't figure out how to do this. I tried following several different documentation on this and also did a search and tried to follow what i found there as well. But I'm confused.

What would be the step-by-step process for doing this? Starting from the very, very beginning. Such as 1. First create the CPT with repeating fields this way Or should I not have the repeating fileds in the CPT?.
THEN 2. Do this ect... I'm thinking maybe the order that I'm doing things in might be a problem? I don't know.

I created a post form for the "job" CPT and a post form for "rooms" but I can't seem to figure out how to get the repeating fields to work with the job form.

I am willing to start over if I'm totally out in left field lol!

Eventually I want the jobs to be tied to the user that entered them... so that when that user logs in they can ONLY see their jobs.

What is the link to your site?
hidden link
Here is admin access: moldtestco / rUwithme?

Thanks in advance for any guidance you can provide.
Laura

#1319241

Shane
Supporter

Languages: English (English )

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

Hi Laura,

If I get this correctly, you want to Create A Job, but i'm assuming the Rooms is your repeatable field group.

So first as you already know the repeatable field groups for the frontend is created as a form. So the user will need to constantly resubmit the form is they want to add more rooms to the same job.

What you can do is to redirect the user from the Jobs form to the Rooms form after they have submitted their Jobs form. On the Rooms form you can just let the form keep displaying itself whenever the user submits it, this way the user can continuously submit as many rooms as they would like.

What I see so far and based on your requirements this is the way to do it. Its just that on the frontend its not as intuitive to create the repeatable field groups like how it is on the backend.

Please let me know if this helps.

Thanks,
Shane

#1319267

Ok... I think I get it.... just to make sure can you confirm that the following process is correct?:

1. I created a CPT called "jobs" in theis CPT I have a repeating fields group.

2. In order to allow users to enter their data into this CPT from the front-end I need to use Post Forms.
I would need to create two separate forms 1) for the regular (non-repeating) fields and 2) for the repeating fields group.

How does the repeating rooms know which "job" CPT it belongs too?

#1319283

Well... I tried setting it up like I described above, but the form I created for just the non-repeating fields automatically added the repeating fields in it and will not let me remove them? If I can send you admin login.....would you kindly login and "see" what I might be doing wrong? this is a dev site so it's ok to play around here.
Thank you,
Laura

#1319355

Shane
Supporter

Languages: English (English )

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

Hi Laura,

I would need to create two separate forms 1) for the regular (non-repeating) fields and 2) for the repeating fields group.

How does the repeating rooms know which "job" CPT it belongs too?

That is correct you will need to create a form for Jobs and a form for Rooms.

There will be a field that on the Rooms form to connect it to a particular job. The user will need to select which room the job belongs to.

I tried setting it up like I described above, but the form I created for just the non-repeating fields automatically added the repeating fields in it

I'm not sure what you mean, could you perhaps send a screenshot highlighting the fields you are referring to ?

Thanks,
Shane

#1319445
FireShot Capture 215 - Edit Post Type ‹ Mold Test Company — _ - https___wordpress-204758-946314.cl.png
FireShot Capture 214 - Toolset Dashboard ‹ Mold Test Company_ - https___wordpress-204758-946314.cl.png
FireShot Capture 211 - Edit Post Form ‹ Mold Test Company — _ - https___wordpress-204758-946314.cl.png
FireShot Capture 210 - Edit Post Form ‹ Mold Test Company — _ - https___wordpress-204758-946314.cl.png
FireShot Capture 209 - Post Forms ‹ Mold Test Company — Word_ - https___wordpress-204758-946314.cl.png

here are screenshots of what I have setup...

#1319509

as you can see in the screenshots when i try to create just the repeatable fields group form it adds all the other firlds atomatically and I'm not able to delete them.

#1319529

would it help if I could send you admin login... to save us some time? Let me know.
thanks!

#1319541
FireShot Capture 217 - Edit Group ‹ Mold Test Company — Word_ - https___wordpress-204758-946314.cl.png
FireShot Capture 216 - Edit Group ‹ Mold Test Company — Word_ - https___wordpress-204758-946314.cl.png

I meant to send you these two screenshots as well...

#1319591

Shane
Supporter

Languages: English (English )

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

Hi Laura,

It seems you have removed the repeatable field group for Rooms.

I went ahead and added it back as well as created a form that will allow you to populate only the RFG fields.

As you can see here in the link below the form only has the fields that are for the RFG.
hidden link

Please let me know if this is a little bit clearer for you. So when the user submits this form they will only be submitting fields for the RFG.

Thanks,
Shane

#1319597

Are you working tomorrow? My PC is doing an update right now .... I will look at this 1st thing in the morning... thanks!

#1319639

Shane
Supporter

Languages: English (English )

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

Hi Laura,

Yes I will be working tomorrow. However my timezone is GMT-5 so i'm available during this time.

Thanks,
Shane

#1320501

Hi Shane - Thank YOU!! that works! I have a question about the file upload fields....
We do not want the user to be able to pick images from the WP media library. We want them to ONLY be able to upload new image file. Is there a way to make that happen?
thanks!

#1320503

Nevermind - I figured it out! ....there's a checkbox that i had checked that allowed Media file access.

#1320507

Shane
Supporter

Languages: English (English )

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

Hi Laura,

Is everything ok now ?

Please let me know.
Thanks,
Shane

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