Submit with form_button - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Submit with form_button (/showthread.php?tid=40143) Pages:
1
2
|
Submit with form_button - El Forum - 03-31-2011 [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 Submit with form_button - El Forum - 03-31-2011 [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 Submit with form_button - El Forum - 04-01-2011 [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! Submit with form_button - El Forum - 04-01-2011 [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.. Submit with form_button - El Forum - 04-02-2011 [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 Submit with form_button - El Forum - 04-02-2011 [eluser]andyy[/eluser] Are you using ajax? Or are you just using jquery to submit the form? Submit with form_button - El Forum - 04-03-2011 [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. Submit with form_button - El Forum - 04-03-2011 [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-guide/helpers/form_helper.html It contains the functions and how to properly pass parameters. Submit with form_button - El Forum - 04-04-2011 [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.. Submit with form_button - El Forum - 04-04-2011 [eluser]predat0r[/eluser] In a separate css i had an input style that disturbed my UI css.. Now removing this tag error goes away. |