Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Formbuilder submit button

edited March 2011 in Modules
I have use the form builder to build a form on my controller, the form serve as sending different parameter to generate a chart, but now every time when i click the submit button , it will prompt the "confirm navigation" error message saying the data didn't save etc etc , is there anyway to turn off this ?

some of solutions I m consider
1. abandon the formbuilder class rebuild with form class
2. anyway to overwrite the class of submit button ? it seem like without class='submit' there will be no prompt message

Comments

  • edited 11:12AM
    I'm assuming this is in the admin correct? So that message shows up if a form fields input value has changed since the page was loaded. The fuel/modules/fuel/assets/js/jquery/plugins/jquery.checksave.js is what is controlling that. There are two functions on that plugin that may be helpful $.removeChecksave() and $.changeChecksaveValue(...). Perhaps you can include a js file that would in remove or change the checksave value of the field being changed. FUEL uses the $.changeChecksaveValue function in the fuel/modules/fuel/assets/js/fuel/controller/PageController.js file.

    Also in your MY_fuel.php config file, you can set $config['warn_if_modified'] = FALSE; which will turn that off for all modules.
  • edited 11:12AM
    thanks Admin.

    just to share how i did this, must use click, if you use .submit, the checksave will fire first.

    $(document).ready(function() { $('#submit').click(function(e){ $.removeChecksave(); }); }); </script>
Sign In or Register to comment.