Hi,
I also have this error and this did not fix the error.
I am confused because this works well when I click preview form, but when I put the shortcode in a text editor, the form show up, the button as well, but the repeater is not working!
Uncaught TypeError: Cannot read property '1' of undefined
at gfRepeater_repeatRepeater (gf-repeater.min.js?ver=1.0.9:1)
at HTMLSpanElement.<anonymous> (main.js:69)
at HTMLSpanElement.dispatch (jquery-1.8.3.min.js:2)
at HTMLSpanElement.u (jquery-1.8.3.min.js:2)
Now, I added this :
if (empty($value)) {
$value = array();
$value['formId'] = $form_id;
But the error is still the same.
The Begin repeater has Repeater : ID field 1
The end repeater has Repeater : ID field 3
Now, in the console, I’ve tried to look what is in gfRepeater_repeaters and this is what showed up :
console.log(gfRepeater_repeaters)
VM3008:1 {}__proto__: Objectconstructor: ? Object()arguments: (...)assign: ? assign()caller: (...)create: ? create()defineProperties: ? defineProperties()defineProperty: ? defineProperty()entries: ? entries()freeze: ? freeze()getOwnPropertyDescriptor: ? getOwnPropertyDescriptor()getOwnPropertyDescriptors: ? getOwnPropertyDescriptors()getOwnPropertyNames: ? getOwnPropertyNames()getOwnPropertySymbols: ? getOwnPropertySymbols()getPrototypeOf: ? getPrototypeOf()is: ? is()isExtensible: ? isExtensible()isFrozen: ? isFrozen()isSealed: ? isSealed()keys: ? keys()length: 1name: "Object"preventExtensions: ? preventExtensions()prototype: {constructor: ?, __defineGetter__: ?, __defineSetter__: ?, hasOwnProperty: ?, __lookupGetter__: ?,?…}seal: ? seal()setPrototypeOf: ? setPrototypeOf()values: ? values()arguments: (...)caller: (...)length: 1name: "values"__proto__: ? ()<a href="https://codex.www.ads-software.com/Scopes">Scopes</a>: Scopes[0]No properties__proto__: ? ()<a href="https://codex.www.ads-software.com/Scopes">Scopes</a>: Scopes[0]hasOwnProperty: ? hasOwnProperty()isPrototypeOf: ? isPrototypeOf()propertyIsEnumerable: ? propertyIsEnumerable()toLocaleString: ? toLocaleString()toString: ? toString()arguments: (...)caller: (...)length: 0name: "toString"__proto__: ? ()<a href="https://codex.www.ads-software.com/Scopes">Scopes</a>: Scopes[0]valueOf: ? valueOf()__defineGetter__: ? __defineGetter__()__defineSetter__: ? __defineSetter__()__lookupGetter__: ? __lookupGetter__()__lookupSetter__: ? __lookupSetter__()get __proto__: ? __proto__()set __proto__: ? __proto__()
So this returns an Object, but in gf-repeater.min.js, I see this :
gfRepeater_repeaters[e][r]
Where e represents the first parameter passed to gfRepeater_repeatRepeater() and r represents the second one. So my guess is that this is an Object ( gfRepeater_repeater ) and when we try to access gfRepeater_repeaters[e][r], it returns undefined.
Knowing that, I still have no clue on how to work around this!
If you have any idea on this please reply.