Forums

Repeater area

bart99.hermans266 06 Jan, 2025

Hi Max,

I'm making a form in which users can create an event. Within the form they can create a number of options from which a person can choose while subscribing for the event.

I would like to do this with a repeater, because the number of options might differ for every event or there might not be any options at all.

A second repeater on the same page would allow user to create their own data fields for this specific event.

I already managed to get the repeaters on the screen, but there seem to be some issues:

  • The first repeater does not show any fields by default, while the second already shows 1 field. Both repeaters are configured in the same way, but with the second repeater there is a small issue: 
    • If I remove this first option, I cannot add new options anymore (the button doesn't do anything).
    • Also, if I remove the first option and submit the form, it's coming back.
  • One of the fields inside the repeater is required. Meaning that if they choose to add an option, they will have to fill out this field.
    • However, when I submit the form it always says "Please fill out this field" even if I didn't add an option yet or the option has already been removed.

I'm not sure if it is clear to you, maybe I could make a video showing what's going wrong?

Best regards,

Bart

Max_admin 15 Jan, 2025

Hi Bart

Can you remove any extra information from a copy of this form and attach it here so that I can test it ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
pimh 23 Feb, 2025

Hi Max and Bart, 

I found this post when looking for solutions to having one repeater area included by default. In my CF6 form I had this option, but now it is missing. Although it is not the same problem, there is some overlap here. 

The issue of Bart sounds like in the first the hidden is working on the cloner area that should be hidden, where it is not working on the second. Removing this area makes cloning imposible. 

I also found a post on CF7 to include one element by using jquery, but I can't get that to work on CF8. Curious to the solution and also this bug"?", since my page might run into similar issues. 

Hopefully there will be some progress, since I really need the repeater for my form. 

Kind regards,Pim

Max_admin 24 Feb, 2025
Answer

Hi

@Bart

There is a bug when you use a different repeater key, so changing the key back to "n" will fix the issue, but the bug is fixed in the next update and "m" should also work

@pimh

if the problem for you is having an existing item when the repeater is loaded then this feature has been added to the next update:

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
pimh 24 Feb, 2025

Hi Max, 

Thanks a lot and keep up the good work. One question which version will contain the update? I now have 8.0.39 and I don't see the start count. Will it be available in version 8.0.40 and when do you expect this to be available?

I hope this version also fixes something with my validation. Now I have a repeater included and all my validations are messed up. I get a validation of a another field (postal code) being visable and applied on the name field. An the one for email on the house-number. So with the new release I will test again, and hope it will be fixed. But you might also be able to test it on your side. 

Kind regards,Pim

Max_admin 25 Feb, 2025

Hi Pim

Can you prepare a test form with the validation issue you noted ? for me the validation works fine with the repeater too, the errors are marking the correct fields

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
pimh 25 Feb, 2025

Hi Max, 

Attached my sample project (reduced to items that trigger and are affected by the validation error). I hope it does the same at your side. For me the firstname gets the postalcode validation error and the item (in the full original project this was the housenumber) gets the message of the email adres. 

Hope you figure out what causes this behavior. 

Kind regardsPim 

TestForm_25_Feb_2025_19_24_27.cf8bak

Simplified form with repeater that assigns validation messages to the wrong input.

pimh 10 Mar, 2025

Hi Max, 

Have you checked the above issue for which I created a small test form? 

My own debugging of the issue let to the assumption that it might only occur when the repeater is at the beginning of the form followed by some static input fields. It seems the ids used to refer to the element for validation is wrong, when using the repeater. But for me it is rather hard to really debug. Moving the repeater to the end of my form might solve the issue, but is not a good option (logical order for me starts with the fields in the repeater). 

Hope to hear soon if there is fix/solution. 

Kind regards,Pim

Max_admin 27d ago

Hi pmh

this is a problem with the repeater when you have any required fields inside it, I have applied some changes to the code and hopefully this will work correctly with the next update.

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.