Timeline for how to save multiple checkboxes value in wordpress dynamically
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 24, 2016 at 10:44 | comment | added | mkafiyan |
actually I want to check all input which checked not show them on the post. I try to do it with this part echo '<input name="save-author-to-book[]" type="checkbox"' . $input_check . ' value=' . $id ; if (get_post_meta( $post_id, $key,$id )) { echo " checked"; } echo '>' . get_the_title() . '</br>';
|
|
Aug 24, 2016 at 10:41 | vote | accept | mkafiyan | ||
Aug 24, 2016 at 10:17 | comment | added | mkafiyan | I update it. you can check | |
Aug 24, 2016 at 10:14 | comment | added | Mohammad Mursaleen | Updated code on how you can display those values in front end. | |
Aug 24, 2016 at 10:13 | history | edited | Mohammad Mursaleen | CC BY-SA 3.0 |
Additional information added
|
Aug 24, 2016 at 8:37 | comment | added | mkafiyan | first if wasn't needed. it works fine in database now but still don't have any idea to how can display checked values in metabox. | |
Aug 24, 2016 at 8:18 | comment | added | mkafiyan | ok it works fine and stores in database. but it store as an array and I don't know how can I display chosen values in my custom filed | |
Aug 24, 2016 at 8:06 | history | answered | Mohammad Mursaleen | CC BY-SA 3.0 |