<div class="gmail_quote">On Tue, Dec 15, 2009 at 10:51 AM, Derek Wueppelmann <span dir="ltr"><<a href="mailto:dwueppel@gmail.com">dwueppel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello all,<br>
<br>
I'm currently using FormBuilder to generate some forms to be used in my<br>
Catalyst Application. However FormBuilder wants to have the same method<br>
handle the submit as well as the display. For certain reasons this isn't<br>
what I want. So I'm trying to set the action of the form to the correct<br>
path. However FormBuilder only wants to take a path that is rooted for<br>
it's action argument, for example:<br>
<br>
$form = $self->formbuilder();<br>
# Works:<br>
$form->action('/path/to/method');<br>
<br>
# Doesn't work:<br>
$form->action('path/to/method');<br>
# Still doesn't work:<br>
$form->action("<a href="http://example.com/path/to/method" target="_blank">http://example.com/path/to/method</a>");<br>
<br>
What I really want to be able to use is something like:<br>
<br>
$c->uri_for($self->action_for('method_name'), ...);<br>
<br>
However this returns a url complete with the HTTP. Is it possible to get<br>
something similar that provides just the path (/path/to/method)? The<br>
reason I want to do it this way is that I have some methods that are<br>
submitting to URLS that contain captures.<br><br></blockquote><div><br></div><div>$c->uri_for returns a URI object. If you look at the pod there, you'll see the ->path method which returns exactly what you want.</div>
<div><br></div><div>-J</div></div><br>