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
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
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
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
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:
and then I solved 🧐
Thanks a lot
<?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.