I am using the code below to get value from a multi checkbox. {Update_comment_meta ($ check, 'idea') ( The problem is that this code is apparently putting in the array I need the function For more details, I generate the HTML form code: Your help is always appreciated. Sending unchecked values is not easy to post to some extent. The better solution is to use the checkbox in a way You can easily use it in a post page. Use the hidden input with the checkboxes. The checkbox gives preference to the hidden input. Now, both have the same name after the submission, check_box_con will show hidden field values if unchecked, override and display other originals. To see more > $ _ POST ['check_list'] checked values only
update_comment_meta also on unselected values, perfom by inserting '0' as a third parameter instead of '1'.
& lt; Form action = "id =" primaryPostForm "method =" POST ">
& Lt; form & gt; Input type = 'checkbox' value = '1' name = 'check_box_con' & gt; & lt; / form & quot; input type = 'hidden' value = '0' name = 'check_box_en' & gt; Gt;
No comments:
Post a Comment