I have a problem with form submitting in Yii after adding additional fields with jQuery.
So, I have piece of JavaScript in my _form view, and adding elements works fine. But upon submitting form with additional fields added by jQuery, I don’t get those values in $_POST array.
Yes, they have. If I add additional fields in _form view manually then I get their values properly, but if I add the same fields with js, then I can’t get values when submitting form.
Weird thing is that it works perfectly in simple forms written in php, something like this.
I think I figured this out. Markup was messed up. I’ve had something like this:
<div class="form">
<form ...>
... form fields ...
</div><!-- end of form div -->
<div class="sidebar">
... more form fields ... -->
<textarea></textarea>
</div><!-- end of sidebar div -->
</form>
I never thought that something like this can affect form functioning. Anyway, thank you!