Skip Navigation

[Resolved] Repeat field group for images in forms

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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 9 replies, has 2 voices.

Last updated by Nigel 4 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#1574851

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.

Kind regards

#1575547

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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

See https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/

It is probably not the workflow you were hoping for, but is what's required I'm afraid.

#1576063

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.

Kind regards

#1577017

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

You can do it with Blocks (and we'll soon be releasing a major update relating to this, too).

With Views you would need to create such a slider more-or-less manually. See this older post for a solution: https://toolset.com/forums/topic/how-to-display-the-pics-i-uploaded-as-a-slider/#post-518295

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.

#1584323

Hi there,

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.

Many thanks!!

Kind regards

#1584789

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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.

The slider in blocks—for transitioning between field values from the same post—doesn't have the option for vertical transitions, you would need to submit a feature request for that (https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/).

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.

#1585085

... "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.

Kind regards

#1585095

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Yes, I realise that.

I'm just not sure what I can help you with now, if anything.

#1585115

... 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.

Kind regards

#1585309

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, so you have the option of setting up your forms workflow to submit repeatable field groups as described above (https://toolset.com/forums/topic/repeat-field-group-for-images-in-forms/#post-1575547) and then you can use Views to create a slider with vertical transitions.

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.