[Resuelto] Help in setting a front-end form for repeatable field groups
This support ticket is created hace 2 años, 8 meses. 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.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
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)
Este tema contiene 23 respuestas, tiene 3 mensajes.
Sorry but this is not something regarding our setup...
Question is simple: is it possible to have, in a FRONTEND form, that kind of repeater ( for any RFG ) that you find in backoffice when you edit the single CPT page? (check my previous screenshot, please)
Why is it possible to have in backoffice and not in frontend? With that repeater you avid the need to create various forms, templates, view ecc. just to edit a RFG group.
With a single repeater (so a single field) you can: ADD, EDIT and REMOVE.
You can not combine the post form and the repeating field group form in a single form like backend, you can say that's a limitation or how it works for frontend.
For instance:
- You have post type "Student" having 10 custom fields
- You have repeating field group "Social information" having 3 custom fields and this repeating field group is set to display with post type "Student"
Now, as you noticed, its possible to edit both Student post itself as well as repeating field group both as the same time when you try to add/edit the single post of "Student" post type from backend but the same is not possible for frontend.
Even I shared with you working demo, how you can set it up.
There are multiple ways you can setup its based you different requirement and where you want to place the edit form. In your case, you want to first list all repeating field items with ADD, EDIT and REMOVE, so you will have to create a view (in classic mode) so that we can list all repeating field items on different page when we click on "Edit prices list" link from the single post.
I'm not sure where exactly you stuck yet and if you do not want to share your site, we can work on the test site I shared and you can share details where exactly you want help with and then you should try to replicate the same on your site.
We are here to help. I offered you all possible options and you will have to decide. Thank you 🙂
Hello,
here i am again, i followed your example and added with success the RFG list and edit page.
What we need now is to print the title of the related post, for example in your link enlace oculto under the title we would like to print the related post title ("It’s windy" in this case).
How can this be done?
I've created the following form to add new RFG entry:
=> enlace oculto
[where with the parent field I've set the parent field's default value to be coming from the URL param. Please check the following screenshot: enlace oculto ]
Now, on this page: enlace oculto
- You will see a form to add new entry as well as parent title. When you submit the new entry it will automatically populated in the below table that lists RFG entries.
Thank you!
One last thing (i hope...) about getting the title with [wpv-post-link item="[wpv-search-term param='wpv-relationship-filter']"]:
This is working well, so we get the post title of the CPT ROOM.
Now we a relationship with the CPT HOTEL, so a single hotel can have more than 1 rooms and avery room is owned by just one hotel.
What we need is print the hotel name, so we will have: HOTEL NAME > ROOM NAME.
Is this possible?
Thanks a lot!
Hello again, we ran in another problem...
When you click an edit button for the RFG for the row you want to edit, the page load and show the edit form, problem is when in the single CPT post type you add a featured image, the same image is shown in that edit page!
I have added the featured image in your demo so you can see the problem here: enlace oculto
Hello,
i have managed to remove the featured image in the RGF edit form by going here enlace oculto and Disable Featured Image in Elements > Featured Image > disable.
Anyway... why using that page for the edit form instead to use the same page where the RGF is listed?
I mean, when you go here enlace oculto you see the page title "Edit RFG items page", the related page title "It's windy" and the form with the title " Add RFG Entry".
Is it possible to change the single row edit button link url by pointing to the same page plus the cred_rfg_id?
for example enlace oculto
If so, is it possible to use a conditional in order to use the "add form" or the "edit form" based on the existence of the cred_rfg_id variable in url query string?
Edit for will require container to hold the form. It will make things too complicated for you later. I suggest you keep add and edit form on separate pages in order to make sure there will be no conflict.
As per our support policy we entertain only one question per ticket, however we build a full functional module to list, add, edit, delete the RFG from frontend. I suggest you open a new ticket with every new question you may have. This will help other users searching on the forum as well as help us to write correct problem resolution summery for the original issue reported. Thank you for your understanding.