HI
Tell us what you are trying to do?
In a Cred form I want to be able to add some text to the the Repeatable field images ==> ( Credit : Photo by xxx ) it should be different for each photo
Is there any documentation that you are following?
Looked in the forum, but didn't find a simple answer, I tried using a repeatable group but it doesn't work on CRED
What is the link to your site?
enlace oculto (Link to a post, I should be able to show a credit for each photo in the slider)
The idea is that it has to be easy for the client, 1 form to enter all the information of every project
This is the link to the form : enlace oculto (Opened to the guest temporally)
Thanks in advance for your help
In a Cred form I want to be able to add some text to the the Repeatable field images ==> ( Credit : Photo by xxx ) it should be different for each photo
Repeating image fields do not hold text, and there is no way to associate repeating text fields with repeating image fields. You must take a different approach, like Repeating Field Groups, or create a separate custom post type to hold these images and their respective credits.
I tried using a repeatable group but it doesn't work on CRED
Nested RFGs (one RFG inside another RFG) are not supported, but single-level repeating field groups can be added or edited in Forms now. Create a new Form and choose "Add new content" in the Form settings, and select the Repeating Field Group instead of a post type. In a View of this RFG, you can add an Edit Form link shortcode to display a link to an RFG Editor form. You cannot manage RFGs in a Form associated with their parent post. You must use separate Forms to manage RFGs independently.
The idea is that it has to be easy for the client, 1 form to enter all the information of every project
Unfortunately it's not currently possible to do everything you described in one Form. Neither RFGs nor child posts can be managed in the same Form that manages the parent Project post. Each post type (or RFG type) requires a separate Form in the current system. You have two basic options: use RFGs or use related custom post types.
Thank you Christian
1- I use a form to create the project (All the text fields)
2- On saving I send the user to the RFG Form ==> New page with the RFG form
- They have to associate the project to the images ? cant it be done automatically ?
- Why do we need name for the image ? can we give it automatically the name of the project ?
- Only 1 set by form ? is not really à repeating group on CRED ==> on saving I have to send them back to again to the form ?
The child option have the same issues, they have to go to à new form and chose the project, and 1 form for 1 child 🙁
It amazes me how difficult it is to add a text to a picture
-----------------------
I guess the best solutions is not to allow multiple-instances for the images
image 1 + caption 1
image 2 + caption 2
image 3 + caption 3
...
with a conditional output so they don't think they need to fill out all the fields
They have to associate the project to the images ? cant it be done automatically ?
Yes, you can set the value of the parent post automatically and hide the field with CSS.
- Create a Page that contains the New RFG Form
- In the Project template, use the Toolset Forms button to insert a "Create child post link"
- Choose the page containing the New RFG Form and choose "Set the parent according to the currently displayed content"
- Edit the New RFG Form and add CSS to hide the parent select field and label, like this:
<div class="form-group" style="display:none;">
<label>Project</label>
[cred_field field='@project-image.parent' select_text='--- not set ---' class='form-control' output='bootstrap']
</div>
Why do we need name for the image ? can we give it automatically the name of the project ?
You can remove the title field if you do not want to show it in the Form. To automatically assign a title based on the parent Project, you can use the cred_save_data hook - https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data If you need assistance with this hook, feel free to open a separate ticket for information on setting a post title using the title of a parent post.
Only 1 set by form ? is not really à repeating group on CRED ==> on saving I have to send them back to again to the form ?
In the current system, yes. Repeating field groups are managed one row at a time. We are working on something simpler like the editor in wp-admin, but that work is still in development.