<form method="POST"> <input type="checkbox" name="helloworld" onClick="this.form.submit()"> </form>
I need to check value of this checkbox in controller only when user click on it and do smth (for example, session.helloworld=True if it's checked and False if not) But I can't check if form is submitted, because if it is and checkbox isn't checked, "if request.vars.helloworld" returns False On 8 мар, 02:31, DenesL <denes1...@yahoo.ca> wrote: > Any submit sends the form to the controller. > Can you post the exact code?. > > On Mar 7, 2:12 pm, LightOfMooN <vladsale...@yandex.ru> wrote: > > > > > > > > > No. I need to know when the form is submitted to make some process. > > > For example if i have form with <input type="submit" name="mysubmit"> > > and some inputs for data, I can process it in controller with checking > > form submitting like that: > > > mycontroller_function(): > > if request.vars.mysubmit: > > do something > > > but if I want to submit form without! button, for example using > > onClick event on <input type="checkbox"> > > How can I check, if form is submitted? > > > On 7 ÍÁÒ, 19:56, Iceberg <iceb...@21cn.com> wrote: > > > > On Mar 7, 1:33šam, LightOfMooN <vladsale...@yandex.ru> wrote: > > > > > I try to process <checkbox onClick="submit()">, but can't check, if > > > > form with that checkbox is submitted. > > > > > How to check if form is submitted? > > > > As long as your form is submitted into your own web server, a new line > > > of log appears in the log file or console. Isn't that your case?