Javascript in form_open() |
[eluser]Sceok[/eluser]
Hi everybody, I've read many things but I haven't read a thing so far about the possibility of putting some Javascript in the opener tag of a form using the method "form_open()" from the Form Helper. Just to show you why I'm asking this, there are cases when you may need to write that part in the form opener tag as a last attribute : Code: onsubmit="return(jsFunction())" And in order to make sure my website stays portable, I'd preferred using the method from the Form Helper. Anyone has information on it ? Or a solution ? Thanks.
[eluser]CroNiX[/eluser]
Look at the "Adding Attributes" section for form_open(), where you can add any extra key/value pairs: http://ellislab.com/codeigniter/user-gui...elper.html
[eluser]Sceok[/eluser]
Yeah thanks !!! I had already tried this but I probably made a mistake while writing. I tried again after reading your comment and yeah it works, probably my mistake. Thank you for making me try that thing again ^^ |
Welcome Guest, Not a member yet? Register Sign In |