Submit with form_button |
[eluser]predat0r[/eluser]
Is it possible to submit and validate a form with form_button? Why? I use JqueryUI for nice buttons, but the <input> type submit button renders differently than <button> types. When I use form_button with type=submit, nothing submitting, nor validating. I use CI's own server-side validation. And I don't want to ticker UI css at first. Thanks
[eluser]InsiteFX[/eluser]
The CodeIgniter Submit button is in the form_helper so you should be able to create a MY_form_helper And make the changes you need. InsiteFX
[eluser]predat0r[/eluser]
[quote author="InsiteFX" date="1301593597"]The CodeIgniter Submit button is in the form_helper so you should be able to create a MY_form_helper And make the changes you need. InsiteFX[/quote] thanks i'll try that!
[eluser]andyy[/eluser]
Huh? I use <button type="submit"></button> all the time with absolutely no errors. Can you post your code please? There should be no need to modify the helper..
[eluser]predat0r[/eluser]
[quote author="andyy" date="1301694626"]Huh? I use <button type="submit"></button> all the time with absolutely no errors. Can you post your code please? There should be no need to modify the helper..[/quote] I set up a small form to test the button type, but also didn't work.. Anyway my orig. code: Code: echo form_open('site/test'); JQuery code: Code: $(function() { But without jquery ui doesn't submit or validate, too
[eluser]andyy[/eluser]
Are you using ajax? Or are you just using jquery to submit the form?
[eluser]predat0r[/eluser]
[quote author="andyy" date="1301797540"]Are you using ajax? Or are you just using jquery to submit the form?[/quote] Latter. Somebody told me to do this way because it's working for him.
[eluser]andyy[/eluser]
Jquery is not required to submit the form. You'll need to modify your code, you're passing the parameters to the form_button() function incorrectly: Code: echo form_open('site/test'); I highly recommend you read the CI guide on the form helper: http://ellislab.com/codeigniter/user-gui...elper.html It contains the functions and how to properly pass parameters.
[eluser]predat0r[/eluser]
thx i was lazy to fill out all elements, i know form_helper lib.. but did not solve my prob. i have elementary prob. with UI styleing copied the UI demo samples (there works) and not OK by me. Researching..
[eluser]predat0r[/eluser]
In a separate css i had an input style that disturbed my UI css.. Now removing this tag error goes away. |
Welcome Guest, Not a member yet? Register Sign In |