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.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
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.
That is why this detailed Doc comes in the picture:
- https://toolset.com/course-lesson/front-end-forms-for-repeatable-field-groups
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 already shared detailed steps and you have all control over there with the test site I created for you:
=> https://toolset.com/forums/topic/help-in-setting-a-front-end-form-for-repeatable-field-groups/#post-2324019
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 hidden link under the title we would like to print the related post title ("It’s windy" in this case).
How can this be done?
Thanks
I forgot: could you please update your demo in order to add a "add new" form form that RFG?
Thanks a lot.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
I've created the following form to add new RFG entry:
=> hidden link
[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: hidden link ]
This is how I've added the parent title:
<h1> [wpv-post-link item="[wpv-search-term param='wpv-relationship-filter']"] </h1>
And this is how I've added the form to add new entry for RFG:
<h1> Add RFG Entry </h1>
[cred_form form="add-rfg-form"]
=> hidden link
Now, on this page: hidden link
- 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: hidden link
Hello,
i have managed to remove the featured image in the RGF edit form by going here hidden link 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 hidden link 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 hidden link
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?
Thanks
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
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.