I would like to be able to add several images, each with its own capiton, using a form.
I assumed that I could use custom fields from a repeating group.
However, this repeat group is not offered to me in the form administration.
How can I include a repeat group in a form?
Hello,
Toolset repeatable field group is based on one-to-many relationship, each item of repeatable field group is also a single post, so you will need to follow our document to setup another form for user to add new item in repeatable field groups:
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/
According to W3C document, you can not embed one HTML form(child post form) into another HTML form(parent post form), see similar thread:
https://stackoverflow.com/questions/379610/can-you-nest-html-forms
And in your case, it needs only a custom multiple-instances image field, in the form for creating post, you can enable option "Use the WordPress Media Library manager for image, video, audio, or file fields", see our document:
https://toolset.com/documentation/user-guides/front-end-forms/using-the-native-wordpress-media-manager-in-front-end-forms/
When user upload an image, he canupload multiple images in the same image field, and setup the image attributes, including "capiton", see screenshot Caption.JPG.
thank you
The "detour" in toolset galleries via the Media Library works.
But with a toolset image there is unfortunately no option to use the label from the media library.
So the user has to use two different ways.
Or can the labeling also be used with toolset Image?
Please elaborate the new questions with more details?
What is the "labeling" you mentioned above? how do you setup it?
And where and how do you want to display it?
How can I use the caption from the WP media library for the block toolset-image?
The Toolset Gallery block will display image caption text at the bottom of each image, see screenshot captions.JPG
More help:
https://toolset.com/course-lesson/dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields/
And you can also follow our document to display the image attributes(caption, title, alt) with Types shortcode, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image
For the alt and title attributes, you can also use placeholders to output the values of standard image fields added in WordPress: %%TITLE%%, %%ALT%%, %%CAPTION %%, and %%DESCRIPTION%%.
This is not the answer to my last question. This was:
How can I use the caption from the WP media library for the block toolset-image?
In the gallery there is the option to display captions from the media item.
There is no such thing with an image.
Thanks for the detail, you are displaying post featured image with a Toolset image block, this block can not display image caption attribute directly, but you can use a shortcode to display the image caption:
[tb-caption url="[wpv-post-featured-image size="full" raw="true"]"]
For example, edit the Toolset image block you mentioned in screenshot:
https://toolset.com/wp-content/uploads/2020/06/1682917-exampel.jpg
Find the text "Write a caption", fill above shortcodes, then test again.
More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-featured-image
My issue is resolved now. Thank you! It works