Re: [fw-general] url helper available all over your app

2009-10-22 Thread Саша Стаменковић
Thanks guys, that was really helpful! Regards, Saša Stamenković On Wed, Oct 21, 2009 at 5:59 PM, Jurian Sluiman subscr...@juriansluiman.nlwrote: If you use the form at multiple places, you could consider making it into a view helper. The helper is easy to place inside your views and inside

Re: [fw-general] url helper available all over your app

2009-10-21 Thread Kyle Spraggs
umpirsky wrote: Hi. I wonder, if you want to use url helper for all urls in your app, you can access it from view with $this-url(). from controller with $this-wiew-url()... But when you want for example to use it to set action of a form in form init() method, do you access it

Re: [fw-general] url helper available all over your app

2009-10-21 Thread Саша Стаменковић
Why I want to do this in the form is, I want to set url on one place. Form will be rendered in many views, I don't want each of them set separate url, want to do it in one place, in the form init. Regards, Saša Stamenković On Wed, Oct 21, 2009 at 3:22 PM, Kyle Spraggs the...@spiffyjr.me wrote:

Re: [fw-general] url helper available all over your app

2009-10-21 Thread Hector Virgen
Forms have access to a view object, which it pulls automatically from the ViewRenderer action helper. class MyForm extends Zend_Form { public function init() { $action = $this-getView()-url(/* ... */); $this-setAction($action); /* ... */ } } -- Hector On Wed,

Re: [fw-general] url helper available all over your app

2009-10-21 Thread Jurian Sluiman
If you use the form at multiple places, you could consider making it into a view helper. The helper is easy to place inside your views and inside the helper you could initialize the form and set its action url. Regards, Jurian -- Jurian Sluiman Soflomo.com Op Wednesday 21 October 2009 15:47:45