Hello,
I have created a repeat field group for images and would like to integrate this into my form so that I can upload the selected images in the Fontend. The field group is not offered in the form in the backend.
You can't add fields of a repeatable field group to the posts the field group belongs to, that's not supported unfortunately.
You need to be aware that repeatable field groups are organised using child posts. Every time you add a group of fields to a post it creates a child post which is used to store the actual custom fields.
So the steps for adding repeatable field groups via front-end forms are the same as adding child posts.
You need to create a form to publish the repeatable field groups. As well as the fields of that group, the form will by default also include a parent post selector.
The workflow for the users will be something like
- publish a parent post with a form, which displays the post after submission
- the template for the parent posts includes a link to add a child post (to add a group of fields)
- that link leads to another page which includes the child post form, with the parent post ID passed via a URL parameter
- the user submits this second form to add a group of fields to the parent post
Ok, thanks for your hint. Another approach to my problem:
I can use my form to upload images or multiple images from custom fields. Can I output these images via a view as a slider in a layout for custom post types?
I somehow don't get this to work.
If you want to try it out in Blocks, you would use the Repeating Field / Gallery block. It's fairly intuitive, but if you want to try it and get stuck then let me know.
I've been working extensively on toolset blocks in the past few days. I think with this tool I can implement my project a little better. However, the tool still has some teething problems and the implanted sliders leave a few wishes unfulfilled. For example, I would need a slider with a vertical transition, which was possible with views.
Views sliders had an option for vertical transitions, but Views sliders were always for transitioning between posts not between field values belonging to the same post.
But, if your image fields were part of repeatable field groups then your slider effectively would would be transitioning between posts and could be implemented with Views as before.
... "But, if your image fields were part of repeatable field groups then your slider effectively would would be transitioning between posts and could be implemented with Views as before".
... then I cannot upload the images via my frontend form, which would bring us back to the source of my problem.
... I need a slider with a vertical transition for my project. The associated pictures should be uploaded using my frontend form.
The coordination and cooperation between the individual toolset modules leaves a lot to be desired. With somewhat more demanding objects, you always come up against limits and problems.
There can be no question of website creation without code knowledge, as advertised.
Or, if you don't like that option for your forms and you want to just use normal fields (with multiple instances) then you can't use Blocks to create the slider because it doesn't support vertical transitions (I recommend you request it), and you would need to manually add a custom slider yourself.
You can see an example of what's involved here: hidden link
However, that solution uses the flexslider library, which doesn't support vertical transitions. However, the principles are the same whichever slider library you choose, you need to enqueue the files required by the slider library to function, and then output markup in the required format, as outlined in that linked post.
I'm sorry we don't have an off-the-shelf solution for you.