<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-09-21 13:20 GMT-05:00 Andrew Beverley <span dir="ltr"><<a href="mailto:andy@andybev.com" target="_blank">andy@andybev.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, 2015-09-21 at 13:09 -0500, Richard Reina wrote:<br>
> I have learned how to display variables in template toolkit with <%<br>
> varname %>. However, these variables are being named from withing my<br>
> dancer app and displayed on the template. Is there a way to display<br>
> variables that a user is entering as they are entering it.<br>
<br>
</span>Not as part of TT - that all happens server side.<br>
<span class=""><br>
>  So that if I have a menu like form where a user can pick several<br>
> items and see them each added one by one in a list format before<br>
> pressing a second submit button that submits his entire lists of<br>
> entries? It would be a bit like a shopping cart but instead of the<br>
> items being put in the cart they are displayed right there in the form<br>
> as they are added.<br>
<br>
</span>In which case you have 2 options:<br>
<br>
1. Process it client-side with javascript (not recommended)<br>
2. Make each "addition" a new request, and store server-side<br>
<br>
You could also do a combination with AJAX-type calls, which is probably<br>
the best "modern" way of doing it, although it will be more complicated<br>
than option 2.<br>
<br>
Andy<br>
<br></blockquote><div><br></div></div>I have gone the with option 2. Basically I have two forms in the template. Form 1 lets the user add an item. Form 2 keeps a running tally of the items thus far added. What I can't figure out is how to make dancer differentiate between the two forms so that it knows that the user is done adding items and wants to check out so to speak he can hit the submit button of Form 2 to save all his submissions. Both forms have submit buttons but I am not sure how to make the POST route understand that the user is done with the form so that I can in turn make it save the data.<br><br></div><div class="gmail_extra">Thanks for any ideas.<br><br> <br></div></div>