<div dir="ltr">Wait, Does this provide a clue to the error of my ways? This is the template (<a href="http://user.tt">user.tt</a>) that I am using for the form. <br><br><!DOCTYPE html><br><html><br><body><br><br><h1>Get in the game.</h1><br><br><form><br>First name:<br><br><input type="text" name="firstname"><br><br><br>Last name:<br><br><input type="text" name="lastname"><br><br> <br>Email Address:<br><br><input type="text" name="email"><br><br><br>User Password:<br><br><input type="password" name="psw"><br><br><br>User Confirm Password:<br><br><input type="password" name="psw2"><br><br><br>Terms & Conditions<br><input type="checkbox" name="terms"> I agree with terms and conditions.<br><br><br> <br><input type="submit" value="Go" /><br></form><br><br><p>Note that the form itself is not visible.</p><br><br><p>Also note that the default width of a text field is 20 characters.</p><br><br></body><br></html><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-07 9:36 GMT-05:00 John Stoffel <span dir="ltr"><<a href="mailto:john@stoffel.org" target="_blank">john@stoffel.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
You need to build a web page with a FORM first, then submit the data<br>
that way to the /user URL, so it can get handled.<br>
<br>
Try using git to clone this repository and use that as a base for your<br>
playing around:<br>
<br>
<a href="https://github.com/agordon/dancer_bootstrap_fontawesome_template.git" rel="noreferrer" target="_blank">https://github.com/agordon/dancer_bootstrap_fontawesome_template.git</a><br>
<br>
I don't have any working examples handy right this second...<br>
<br>
Richard> I am hoping someone can help me understand how to get this to<br>
Richard> work as a POST instead of GET. When I do sub below as 'get'<br>
Richard> it works but when I replace 'get' with 'post' I get:<br>
<br>
Richard> --2015-08-06 13:52:05-- <a href="http://0.0.0.0:3000/user" rel="noreferrer" target="_blank">http://0.0.0.0:3000/user</a><br>
Richard> Connecting to 0.0.0.0:3000... connected.<br>
Richard> HTTP request sent, awaiting response... 404 Not Found<br>
Richard> 2015-08-06 13:52:05 ERROR 404: Not Found.<br>
<br>
Richard> package MyApp;<br>
Richard> use Dancer ':syntax';<br>
Richard> use Dancer::Plugin::FormValidator;<br>
<br>
Richard> our $VERSION = '0.1';<br>
<br>
Richard> post '/user' => sub {<br>
<br>
Richard> my $input_hash = {<br>
<br>
Richard> FName => param('firstname'),<br>
Richard> LName => param('lastname'),<br>
Richard> Email => param('email'),<br>
Richard> Terms => param('terms'),<br>
<br>
Richard> };<br>
<br>
Richard> my $number_of_defined_values = scalar grep { defined } values %{$input_hash};<br>
Richard> $number_of_defined_values = $number_of_defined_values + 0;<br>
<br>
Richard> if ($number_of_defined_values > 1) {<br>
<br>
Richard> my $error = form_validator_error( 'profile_user', $input_hash );<br>
<br>
Richard> if ( ! $error ) {<br>
Richard> #the user provided complete and validates data it's cool to proceed<br>
<br>
Richard> } else {<br>
<br>
Richard> my %hash = %$error;<br>
Richard> foreach my $k (keys %hash) {<br>
Richard> return "$k: $hash{$k}\n";<br>
<br>
Richard> }<br>
<br>
Richard> }<br>
Richard> }<br>
<br>
Richard> template 'user';<br>
<br>
Richard> ##########################################################<br>
Richard> }; ### end of sub user ###################################<br>
<br>
Richard> true;<br>
<br>
Richard> Thanks in advance for any help.<br>
<br>
Richard> _______________________________________________<br>
Richard> dancer-users mailing list<br>
Richard> <a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
Richard> <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</div></div></blockquote></div><br></div>