Skip Navigation

[Resolved] User Front End Form Image Field and Display in Posts

This thread is resolved. Here is a description of the problem and solution.

Problem:

Setup repeating image field.

Solution:

You can follow our document to setup and display the repeating image field.

Relevant Documentation:

https://toolset.com/course-lesson/creating-custom-fields/#making-individual-fields-repeatable

https://toolset.com/course-lesson/dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields/

This support ticket is created 3 years, 6 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Don 3 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2078901

Don

Tell us what you are trying to do?

Howdy, I have watched vids and read but I guess I am just not understanding the best way to handle user images.

1) I want users via front end forms to be able to submit multiple post images, ideally with the first being automatically the "default"/featured image.
2) I do NOT want these users to be able to view, modify or remove anything (aside from their own image content) from the sites wordpress media library.
3) I am also using wpallimport with the toolset addon to import data to custom post types on a recurring basis.
4) I have setup custom fields for my custom post type, and set up a form with those fields
5) I have experimented with uploading images and getting them to display in archives/views via the insert of blocks with "Image" (can only select a direct image from media library or specify url source, no DYNAMIC source option), "fields" and "text and fields"....but when i setup the Image field as a custom field for the post type, and in the form allow the user to upload multiple images, i can see they are uploaded with the form

.... but am apparently totally misunderstanding how to do this ideally for the points above, ie multiple images, first one as default post display image, no access/rights to other images in media library as "non admin" user and display correctly in archive, views and posts? If I do as custom field, for some reason it is not shown as an option in the sidebar under "custom fields" for the field group along with all the other fields so i am obviously misunderstanding something or doing something wrong. I just want to know the best way to deal with user images via front end form and via wpallimport imports, so i save images as the correct type/field and can display them....

#2079081

Hello,

There are lots of questions in this thread, I am trying to answer them one by one.

Q) I want users via front end forms to be able to submit multiple post images, ideally with the first being automatically the "default"/featured image.

There isn't such kind of built-in feature within Toolset Forms plugin, as a workaround, you can try these:
1) setup one repeating image field, for example "my-images"
https://toolset.com/course-lesson/creating-custom-fields/#making-individual-fields-repeatable
2) display two fields in your post form:
- Featured image field
- "my-images"

Q) I do NOT want these users to be able to view, modify or remove anything (aside from their own image content) from the sites wordpress media library.
You can install Toolset Access plugin, WP dashboard-> Toolset-> Access control-> Toolset Forms
find and disable option "Use any Media Library file when adding files to front-end User Forms" for specific user role.

Q3) I am also using wpallimport with the toolset addon to import data to custom post types on a recurring basis.
You can follow our document to setup/import the csv files:
https://toolset.com/course-lesson/import-posts-from-csv-with-relationships-using-wp-all-import/

But WP All Import plugin does not support custom repeating field, see our document:
https://toolset.com/course-lesson/how-to-import-content-into-wordpress-using-csv/
row "Support for repeating fields": no yet, coming soon

You can also display above repeating image field as Dynamic Galleries and Sliders, see our document:
https://toolset.com/course-lesson/dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields/

#2079163

Don

thanks for the quick reply. well, since i AM using the wpallimport with toolset addon, the first option for 1) wont work.... thanks for clarifying. I really want to avoid having users having to upload an image TWICE (ie as "featured image" AND as one photo of many for a gallery)..... i was hoping, and kind of assuming, that if multiple images are uploaded via a front end form and/or via file upload, that the "first" image would be the "default" display image (which i think you refer to as "featured image") without having to be uploaded to an independent custom field....

I am also having an issue getting even one image to display, if uploaded via wpallimport, with the "toolset types" field for the image set to map the data from xml just like the other fields.... ALL the other fields map fine to the toolset types and then display as expected in the view, archive and single post page... but the image is NOT being saved to the media library and is NOT displaying anywhere..... is there some sort of setting within toolset that would be causing this? I have photos set as a custom field (image), but the image isnt showing for wpallimport posts, but does for manual ones, although mapped to same field and there IS an image url for the post.... so hoping is a setting or permission somewhere. I have been using access, and made sure that all roles could create and edit posts, but did disable the option to use any media files..... dont see a way to allow them to access their OWN without access to all/other peoples but its probably a different problem anyways....

#2080121

For the new question:

the image is NOT being saved to the media library and is NOT displaying anywhere

This should be a problem of "wpallimport" plugin, In Toolset side, the custom image field stores value of the image URL.

I suggest you check it with wpallimport support, check how to import the image with cvs files.

And I have searched it in google, find some related documents:
hidden link

For your reference.

#2080141

Don

My issue is resolved now. Thank you!