Birthdate element issue in repeat groups [bug]

trb

Member
Hi - I am using the birthday element in a repeating group. It works fine on the first group but does not seem to increment the repeat group number of the ID attribute for the second group. If I inspect the page html I see the following ID's for the three dropdowns.

First Group:
<div class="fabrikSubElementContainer" id="jos_form_18_repeat___dob_0">
<select id="jos_form_18_repeat___dob_0_1" name="jos_form_18_repeat___dob[0][1]" class="input-small fabrikinput inputbox ">
</select>
/
<select id="jos_form_18_repeat___dob_0_0" name="jos_form_18_repeat___dob[0][0]" class="input-small fabrikinput inputbox ">
</select>
/
<select id="jos_form_18_repeat___dob_0_2" name="jos_form_18_repeat___dob[0][2]" class="input-small fabrikinput inputbox ">
</select>
</div>

Second Group:
<div class="fabrikSubElementContainer" id="jos_form_18_repeat___dob_1">
<select id="jos_form_18_repeat___dob_0_1" name="jos_form_18_repeat___dob[1][1]" class="input-small fabrikinput inputbox ">
</select>
/
<select id="jos_form_18_repeat___dob_0_0" name="jos_form_18_repeat___dob[1][0]" class="input-small fabrikinput inputbox ">
</select>
/
<select id="jos_form_18_repeat___dob_0_2" name="jos_form_18_repeat___dob[1][2]" class="input-small fabrikinput inputbox ">
</select>
</div>

This is causing a problem with some age calculation which relies on these dates. Can anyone confirm they are seeing the same thing and is this an issue with the birthday element?

Thanks.
 
As I said: on my site it's showing id=.._0_x and _1_x as expected.
Any special settings?
Same in frontend and backend?
 
Thanks for checking.

I just checked and it appears correctly in the backend.... not sure what that tells me???

For settings I have:
List generation method: since years
Number of years/ start year: 2008
Years forward/backward: -4

I have user javascript on the element which calls an age calculation.
I have swapped the order of the dropdowns in fabrik-element-birthday-form.php - so instead of Day/Month/Year, it is Month/Day/Year

The first group works fine and the dropdowns display Month/Day/Year the second dropdown shows Month/ /
for the dropdowns. The options are still available it just that the labels for Month/Year do not display.

Thank you for any pointers...
 
I've tried reverting the dropdown order back to its original Day/Month/Year with the same result.
I've tried disabling the javascript calculation and also tried using the Beez template but still get the same behavior.
I also tried this on a simpler form on another joomla installation running J3.9.11 and Fabrik 3.9 and get the same thing
First repeat group works fine, the second one only shows Day/ / in the dropdowns and the ID does not increment with the repeat group. Thanks to your suggestion I can see it is correct in the backend....but can't see what could be the issue on the front???
 
Ok, I see it.
It's only after adding new groups (before saving), names are incremented correctly and also the fabrikSubElementContainer id, but not the label for id, the sub-ids and not the fabrikElementContainer class "fb_el_...".
After save (i.e. on the next pageload) all groups are incremented correctly.
So the issue is somewhere in form.js...
 
Thanks for confirming you also see the issue Troester.

For now, I have changed my code to use the name attribute which updates correctly in the repeat groups.
 
Hi - is there any official way to report this bug and hopefully get it resolved? It's easily and 100% reproducible and I'm sure if the right developer were to look at it, it could get fixed.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top