I'm using various nette forms on a various pages alongside other (non-nette)
ajax calls. these pages ajax/post etc so then Nette thinks its own forms have
isSubmitted()=true. but it isn't true. And then
nette overwrites setDefaultvalue() with blanks (as no such fields were
I know I can use setValue instead of setDefaultvalue(), but this will requires a kludge in many forms and controllers using the forms.
as far as I can tell the problem originates in
<?php $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] ?>
i'd rather not overload this method. making
$_SERVER['REQUEST_METHOD']=null will work before the form is
initially generated but that's also a bit ugly, and this mustn't happen when
nette does actually submit prior to validation.
Also, I guess nette therefore breaks when there are two or more nette forms on one page, as neither knows who was submitted (maybe each form needs to carry a unique id and createHttpRequest can check that?).
is there any other way to force Nette to regard the form as not submitted when it wasn't?
Last edited by mikeb (2017-02-03 09:44)