ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Repeating content starting index = 1

davideiandoli75 03 Jul, 2017
I have got a field in which the user enters an integer number and I wish my repeater area displays the group of fields according to this.

Example: If I put "2" in number in first page I'll see 2 groups of fields in the second page. Is this possible? How?

Actually using {data:numero} shortcode I get always one group more than my needs, since the array starting index is 0.

Thanks a lot
Max_admin 03 Jul, 2017
Hi Davide,

You are using the correct syntax, and yes, if the provider is an integer then the repeater will create an array of elements between 0 and that integer, so you need to decrement that number before its used in the repeater's provider.

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
davideiandoli75 03 Jul, 2017
Answer
Ok. I tried to do this by dragging a "Modify data" action in the second part of form, after "Multipage" and before "display section". I set "Data provider" as {data:numero], and then I tried to write in "Data override" this little snippet:

<?php
$this->data['numero'] = $this->data['numero'] - 1;
?>

and then I solved 🧐

Thanks a lot
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com