Hi John.

With this HTML

<input type="submit" name="button1" value="push it for foo">
<input type="submit" name="button2" value="push it for bar">

You will get URLs look like

?button1=push+it+for+foo

So you can detect which one has been pushed by checking the
existence of names in parameter.


On 2015/10/31 4:46, John wrote:
> I am on path of a UI that is a single form with submit buttons for 
> various functions.  In a route I envision taking action based on what 
> button was selected.
> 
>  From Tag Helpers I can see how to assign properties to submit button:
> 
> %= submit_button 'Ok!', id => 'foo'
> 
> However it is not clear how I can key off id in my route.  The param 
> property doesn't seem to provide this information.
> 
> I am open to any suggestions including "don't do it that way do XXXX 
> instead" or "this is basic html.  Learn that first".
> 
> Thanks,
> 
> John
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to