set form action attribute without full url

This is what i am doing currently to set a form’s action through jQuery.



but is there a way to do it using controllers and actions like:

url controller=checkout action=payment

without writing whole orl in jQuery?


It depends how the jQuery is created. If it´s a seperated file that´s simply included in the template, then you won´t be able to use smarty functions. If it´s an inline script then you can use the url smarty function.


This will resolve your problems - passing the parameter via data attribute: