Tell us what you are trying to do?
Create a front end form to edit custom posts (only visible to respective author) where one of the fields is a repeatable field group. The form is being added to an Elementor template.
So far I've understood that the repeater field needs to be placed in a separate form. However, when I insert that form on the page I get the message "Form type and post type do not match". I also attempted to insert a View, however there doesn't seem to be an option in the Elementor widget to make the View into a Form. How can I make this work?
Is there any documentation that you are following?
https://toolset.com/course-lesson/front-end-forms-for-repeatable-field-groups/
Is there a similar example that we can see?
Not sure
What is the link to your site?
hidden link
Hello and thank you for contacting the Toolset support.
The form needs to be aware of what post is editing. Keep in mind that a repeatable field group is also a post type. Create a view that will display the repeatable field group, and put the form inside its loop. That way you make sure that the form is editing the items that come from the view.
If you still encounter this issue, allow me temporary access to your website and I'll check this further. Let me know what form, and where it is being used. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
The form is for editing the Offerings RFG, and it is directly put in the practitioner template. You need create a view for the RFG that will display the RFG items of the current practitioner, then put the form inside the loop of this view. This way, each form will be bound to its respective Offerings item. Does it make sense?
There is a similar view called Offerings. Create another view that has the same query filter, then put the form inside of the view.
Hi Jamal,
I put this code and I'm still missing the ability to add/delete entries to the repeatable group:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[cred_form form='practitioner-offering-settings']
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-layout-end]
How can I make it where the author can add/remove entries? Also, is there a way to make the form with a single Submit button (or at least one for the whole RFG)?
Thanks,
Erik
Hello Eric! The edit form will appear for posts that have currently items on the RFG. For example hidden link
Each item on the RFG will have its own submit button. Because each form is technically its own <form> tag and will need its own submit control. Toolset does not have a built-in solution for this. However, you can workaround it using a combination of CSS, HTML, and Javascript codes. You can add custom CSS to the form that will hide its submit button(and, if you want, the parent post field). Then, inside the view, add an HTML button, and custom Javascript code to listen for clicks on it. Then, programmatically trigger a click on the hidden submit buttons in the RFG forms. Does it make sense?
You can implement the same idea on the whole content template, and with custom CSS, HTML, and Javascript code, hide the submit button of the first form(Practitioner form), the RFG forms' submit buttons. Then add a button that will trigger a click on all forms using Javascript.
Regarding the Add feature, the content template does not have any add form for the RFG field. IMHO, create a form for adding RFG items, then add this form on the view(that holds the RFG's edit form). The form needs to be added OUTSIDE of the loop.
Or you can add it on the content template, before or after, the view(that holds the RFG's edit form).
However, for support rules, we are able to handle only one issue at the time. This helps us to bring you a better service and also helps other users to find all the information here exposed. If you believe that the original request of this ticket has been answered, kindly mark this ticket as resolved, and open a new ticket for any other request.
Hi, I still need assistance with this. Please keep the thread open.
Sure, I'll set this ticket as waiting for your feedback. It will be kept open for two weeks. You will receive notification emails before it gets closed starting from the 1st week. Just reply back and it will be kept open.