<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-10-01 17:33 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Thu, 2015-10-01 at 16:10 -0500, Richard Reina wrote:<br>
> Both forms have submit buttons but I am not sure how to make the POST<br>
> route understand that the user is done with the form so that I can in<br>
> turn make it save the data.<br>
<br>
</span>You can differentiate between submit buttons by checking for the name of<br>
the submitted button, just like any other control on the form.<br>
<br>
If I've understood correctly, then I'd just have the one form, and use<br>
different submit button names.<br>
<div class=""><div class="h5"><br>
Andy<br></div></div></blockquote></div><br></div><div class="gmail_extra">So provided that I have named one button with name="add_entries" and the second name="submit_entries" could i just do the following in my dancer app:<br><br>post '/entries_form' => sub { <br><br> if (defined param('add_entries')) { # the source of this submission was the add_entries button<br> <br></div><div class="gmail_extra"> # qualify and summarize addition<br></div><div class="gmail_extra"> <br></div><div class="gmail_extra"> } elsif (defined param('submit_entries')) { </div><div class="gmail_extra"><br>}<br></div><div class="gmail_extra"><br></div></div>