{"id":9825,"date":"2009-10-26T13:55:58","date_gmt":"2009-10-26T17:55:58","guid":{"rendered":"https:\/\/www.bu.edu\/tech\/?page_id=9825"},"modified":"2013-03-13T15:29:16","modified_gmt":"2013-03-13T19:29:16","slug":"checkboxes","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/people\/forms\/html-elements\/checkboxes\/","title":{"rendered":"Checkboxes"},"content":{"rendered":"<p>You should use checkboxes for fields whose values can be one or                   more of a predefined set of values. By giving each checkbox the                   same NAME attribute, the data will be sent as a list of values if                   multiple boxed are checked. Like text fields, the checkbox uses                   the <code>&lt;input&gt;<\/code> tag, with a TYPE of &#8220;checkbox&#8221;:<\/p>\n<p><code>&lt;input type=\"checkbox\"&gt;<\/code><\/p>\n<p>Each checkbox should also have a VALUE attribute. This is the data                   that will actually be sent to PonyExpress for your checkbox field,                   not the text visible on the page. To have a checkbox default to                   an already-checked state, add the &#8220;CHECKED&#8221; keyword inside                   the INPUT tag.<\/p>\n<p>For example:<\/p>\n<blockquote><p><code> Please contact me by:&lt;br&gt;<br \/>\n&lt;input type=\"checkbox\" name=\"contact\" value=\"email\"&gt;                   Email &lt;br&gt;<br \/>\n&lt;input type=\"checkbox\" name=\"contact\" value=\"phone\"&gt;                   Phone &lt;br&gt;<br \/>\n&lt;input type=\"checkbox\" name=\"contact\" value=\"snail\"&gt;                   U.S. Mail &lt;br&gt;<br \/>\n&lt;input type=\"checkbox\" name=\"contact\" value=\"none\"                   checked&gt; Don't contact me &lt;br&gt; <\/code><\/p><\/blockquote>\n<p>Produces the following output:<\/p>\n<blockquote><p>Please contact me by:<\/p>\n<p><input name=\"contact\" type=\"checkbox\" \/> Email<\/p>\n<p><input name=\"contact2\" type=\"checkbox\" \/> Phone<\/p>\n<p><input name=\"contact2\" type=\"checkbox\" \/> U.S. Mail<\/p>\n<p><input checked=\"checked\" name=\"contact2\" type=\"checkbox\" \/> Don&#8217;t contact me<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>You should use checkboxes for fields whose values can be one or more of a predefined set of values. By giving each checkbox the same NAME attribute, the data will be sent as a list of values if multiple boxed are checked. Like text fields, the checkbox uses the &lt;input&gt; tag, with a TYPE of&#8230;<\/p>\n","protected":false},"author":1685,"featured_media":0,"parent":9805,"menu_order":2,"comment_status":"closed","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/9825"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1685"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=9825"}],"version-history":[{"count":4,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/9825\/revisions"}],"predecessor-version":[{"id":63810,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/9825\/revisions\/63810"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/9805"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=9825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}