JSfiddle: http://jsfiddle.net/NqaZ2/4/
I have two forms on a page, One posts fine but the other does not post anything:
<form id="comment-oa" action="" method="post">
<input type="hidden" name="key" value="coa" />
<input type="hidden" name="action" value="" />
<input type="hidden" name="value" value="" />
</form>
Its being submitted through jquery:
$('a[data-role="fc-delete"]').click(function(){
var id = $(this).parent().parent().parent().parent().attr('id'),
spl = id.split("-");
$('#comment-oa input[name="action"]').attr('value', "delete");
$('#comment-oa input[name="value"]').attr('value', spl[0]);
$('#comment-oa').submit();
});
and I'm simply just doing print_r($_POST)
at the moment, but it just comes up with Array ( )
.
I've checked whether jQuery puts values in and it does (firefox inspector pic):
EDIT:
The other form:
<form action="" method="post">
<textarea name="comment"></textarea>
<input type="hidden" name="reply-id" value="" />
<input type="submit" value="Post comment" />
<input type="button" value="cancel" style="display: none;" />
</form>