Chronoforms6 Repeater Area with Data Provider set to 0, does not create the id using the -N- flag

How to fix ChronoForms 6 repeater area field IDs not generating correctly with Data Provider set to 0.

Overview

The issue occurs because the -N- placeholder flag does not work properly in repeater areas when using a Data Provider value of 0 to pre-populate a starting row.
Instead of using the -N- flag, reference the row index dynamically using the quantity{var:area_repeaterXX.key} syntax for field names and IDs.

Answered
ChronoForms v6
OC OCHSFAB 07 Nov, 2019
So, when I was attempting to use the Data Provider set to 0, to cause the form to start with one row showing, I ran into an issue with the id and name of the fields within the repeater not getting the correct information.
​
What I expected:
​
<input class="pquantity" data-validationrules="{&quot;identifier&quot;:&quot;quantity0-main&quot;,&quot;rules&quot;:[{&quot;type&quot;:&quot;required&quot;,&quot;prompt&quot;:&quot;Quantity&quot;},{&quot;type&quot;:&quot;number&quot;,&quot;prompt&quot;:&quot;Quantity&quot;}]}" data-validate="quantity0-main" data-inputmask="'alias': 'integer'" placeholder="" name="quantity0" id="quantity0" value="1" type="text" style="text-align: right;">
​
What I got:
​
<input class="pquantity" data-validationrules="{&quot;identifier&quot;:&quot;quantity-N--main&quot;,&quot;rules&quot;:[{&quot;type&quot;:&quot;required&quot;,&quot;prompt&quot;:&quot;Quantity&quot;},{&quot;type&quot;:&quot;number&quot;,&quot;prompt&quot;:&quot;Quantity&quot;}]}" data-validate="quantity-N--main" data-inputmask="'alias': 'integer'" placeholder="" name="quantity-N-" id="quantity-N-" value="1" type="text" style="text-align: right;">
​
How am I supposed to make the repeater start with the first row, with the -N- flag working properly? I noticed this because it is messing with my javascript that I am using to calculate totals for each row and the grand total.
​
Thanks!
​
Jay
OC OCHSFAB 07 Nov, 2019
Wow... So, my message just got slaughtered and apparently it is set so that you can't modify your post unless you are a master poster. Let's try this again, without all the garbage in it:
​
What I expected:
<input class="pquantity" data-validationrules="{"identifier":"quantity0-main","rules":[{"type":"required","prompt":"Quantity"},{"type":"number","prompt":"Quantity"}]}" data-validate="quantity0-main" data-inputmask="'alias': 'integer'" placeholder="" name="quantity0" id="quantity0" value="1" type="text" style="text-align: right;">
​
What I got:
<input class="pquantity" data-validationrules="{"identifier":"quantity-N--main","rules":[{"type":"required","prompt":"Quantity"},{"type":"number","prompt":"Quantity"}]}" data-validate="quantity-N--main" data-inputmask="'alias': 'integer'" placeholder="" name="quantity-N-" id="quantity-N-" value="1" type="text" style="text-align: right;">
OC OCHSFAB 07 Nov, 2019
Answer
I figured out that -N- does not work for repeaters. You must use the quantity{var:area_repeaterXX.key} method.
This topic is locked and no more replies can be posted.