Hello,
I have a form with a repeat group that can be repeated over 20 times within form. The form is having over 20 elements, so in the end i will end up with a very long form and very hard to use.
I used Sourcerer plugin to create a TOC in form but i can't make it work using anchors or, better says, nothing happen when i click on the links, the page doesn't scroll down at the group. Please note that i don't need to shows the TOC on the fly, it's ok to be updated every time i load the form.
snippet of code using sourcerer used in Group Intro:
and in form i have a calc element that gets the record id using calc on load:
What i'm doing wrong here?
Thank you
I have a form with a repeat group that can be repeated over 20 times within form. The form is having over 20 elements, so in the end i will end up with a very long form and very hard to use.
I used Sourcerer plugin to create a TOC in form but i can't make it work using anchors or, better says, nothing happen when i click on the links, the page doesn't scroll down at the group. Please note that i don't need to shows the TOC on the fly, it's ok to be updated every time i load the form.
snippet of code using sourcerer used in Group Intro:
PHP:
{source}
<?php
...$myQuery here..
$ancore = $db->loadObjectList();
echo '<ol>';
foreach ($ancore as $ancora) {
echo '<li><a href="#id'.$ancora->id.'">'.$ancora->ab.'</a></li>';
}
echo '</ol>';
?>
{/source}
and in form i have a calc element that gets the record id using calc on load:
Code:
$id = (int)'{contracte_servicii_21_repeat___id_raw}';
//return '<div id="id'.$id.'"></div>'; //tried with id for html5, no changes
return '<a name="id'.$id.'"></a>';
What i'm doing wrong here?
Thank you