Tell us what you are trying to do?
I have a post field group that contains a repeating image field and repeating single line (caption) field that will be displayed in a Toolset View. I’d like to limit the number of times these fields can be repeated to ensure that the user only inputs one set of these fields.
Is there any documentation that you are following?
https://toolset.com/forums/topic/limit-repeating-fields/
Thanks,
Leslie
Hello and thank you for contacting Toolset support.
Currently, there is no way to limit the number of items a user can add into a repeatable field group. However, if you are going to let the user add the data using a Toolset form, there will be a solution using custom code. Some PHP code for form validation and some Javascript code will deactivate the "add item" button on the form. Check this similar ticket https://toolset.com/forums/topic/require-limit-number-of-repeating-field-group-entries/
However, if you are going to let users add the data from the backend, I am afraid there is no way of doing it. Expect, perhaps, using a separate custom post type for screenshots and captions, and a One-to-many relationship that you can actually limit the number of related items.
I hope this answers your question. Let me know if you have any further questions.
Side note: I don't think you will need to have two repeatable field groups to hold the screenshots and captions. Use only one field group that has two fields, an image field for the screenshot and a single line field for the caption.
Hi Jamal,
Thanks for the information and note about repeatable field groups. Is there a way to limit the amount of characters for a single line field?
Thanks,
Leslie
Hello Leslie, I am glad I could help.
However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have created a new ticket and I'll be replying there.
If you don't need further assistance with the original request of this ticket, please mark it as resolved.