Hi,
I'm using the Custom display for the Front List.
In the Body Code section I have some "HTML/PHP code that it should be rendered once for every record in the list" like this:
The problem is that this code is correctly rendered in each record except for the first one where is rendered without the form tag like this:
I noticed that only the first record is enclosed in a form tag, probably this is the reason cause I think that there can not be a form within another for.
Here is the list rendered:
As you can see except for the first one, all the others record are correctly rendered.
What's wrong?
Thanks in advance
I'm using the Custom display for the Front List.
In the Body Code section I have some "HTML/PHP code that it should be rendered once for every record in the list" like this:
<div>
<p>{answer.title}</p>
<form method="post" action="index.php?option=com_chronoforms5&view=form&Itemid=178&lang=it">
<input type="hidden" name="answer_id" value="{answer.id}" />
<input type="submit" value="Reply" />
</form>
</div>
The problem is that this code is correctly rendered in each record except for the first one where is rendered without the form tag like this:
<div>
<p>{answer.title}</p>
<input type="hidden" name="answer_id" value="{answer.id}" />
<input type="submit" value="Reply" />
</div>
I noticed that only the first record is enclosed in a form tag, probably this is the reason cause I think that there can not be a form within another for.
Here is the list rendered:
<div class="chrono-page-container">
<form action="/index.php?option=com_chronoconnectivity5&cont=lists&ccname=Answers&Itemid=169&lang=it" method="post" name="admin_form" id="admin_form">
<div>
<p>{answer.title}</p>
<input type="hidden" name="answer_id" value="{answer.id}" />
<input type="submit" value="Reply" />
</div>
</form>
<div>
<p>{answer.title}</p>
<form method="post" action="index.php?option=com_chronoforms5&view=form&Itemid=178&lang=it">
<input type="hidden" name="answer_id" value="{answer.id}" />
<input type="submit" value="Reply" />
</form>
</div>
<div>
<p>{answer.title}</p>
<form method="post" action="index.php?option=com_chronoforms5&view=form&Itemid=178&lang=it">
<input type="hidden" name="answer_id" value="{answer.id}" />
<input type="submit" value="Reply" />
</form>
</div>
<div>
<p>{answer.title}</p>
<form method="post" action="index.php?option=com_chronoforms5&view=form&Itemid=178&lang=it">
<input type="hidden" name="answer_id" value="{answer.id}" />
<input type="submit" value="Reply" />
</form>
</div>
</div>
As you can see except for the first one, all the others record are correctly rendered.
What's wrong?
Thanks in advance
Hi fasenderos,
I think its because the whole list is inside form tags by default, so you can't use form tags in the body section, you will have to find some way to solve this, maybe pass the record id using the button's name or use javascript "onsubmit"
Regards,
Max
I think its because the whole list is inside form tags by default, so you can't use form tags in the body section, you will have to find some way to solve this, maybe pass the record id using the button's name or use javascript "onsubmit"
Regards,
Max
Hi Max,
this is exactly what I thought, thanks for confirming it.
I think I will use javascript onsubmit
Regards
this is exactly what I thought, thanks for confirming it.
I think I will use javascript onsubmit
Regards
This topic is locked and no more replies can be posted.