am trying to show assigned variable for failed submission on a smarty form.
array assigned as
$arr = array($_POST[number]);
$smarty->assign(number,$arr);
and on tpl form, i added as below.
{foreach from=$number item=no}
<input name="number[]" type="text" value="{$no[{counter start=1}]}" />
{/foreach}
am starting the counter from 1 because this is for dynamically added from jquery, hence am skipping the {$no[0]} from the above input.
But when form gets failed, the counter stays at 1 and does not increase.
How can i increase the number counter to get the exact input array value.
And I also tried,
<input name="number[]" type="text" value="{foreach $smarty.request.no as $no}{$no}{/foreach}" />
from the above tried code, i get all the values of array such as
12345
thanks in advance.