>>Tell us what you are trying to do?
I have a custom post type "product". I would like to give users the opportunity to add their own photos. Can you tell me what is better:
1) Post type "product" and second post type "img" and relationship one to many. Next Form module (img) for users.
2) Post type "product" with field "img". The question is - can I create form only for one field?
Is there any documentation that you are following?
No.
Is there a similar example that we can see?
I don't know 🙂
I would recommend the use of the "Product" post type with the image custom field. It is possible to have a form with only the image field, however the posts will be created with an auto draft title.
You can just let the title field remain so that the user can at least add a title for the image.
I'm not sure i'm understanding correctly. I was under the impression that the user will be creating the products through the form.
"Can you tell me how to create for where a user can add only one field to an existing product?"
So essentially you want to create an edit form but only allow them to upload an image to that specific product correct?
In this case all that is needed is for you to create the edit form and just remove everything else from the form except the image.
Another question is it that A single product can have multiple images uploaded by different users ? Please let me know this as soon as possible so that I can best advise.
Then in this case it would be best if we used a post relationship, One to Many 🙂
I was under the impression that a user will create the products.
So all you need to do is create the relationship between the Products CPT and the Photos (lets call it that) CPT in a one to many relationship.
Then all you need to do is create a custom field for the image and add it to the Photos CPT. Finally just create the Add New Form for Photos and just remove all the fields except the Parent field that will allow the user to set which Product this photo is to be attached to.