{"id":7579,"date":"2023-08-11T15:50:35","date_gmt":"2023-08-11T22:50:35","guid":{"rendered":"https:\/\/membermouse.com\/?post_type=ht_kb&amp;p=7579"},"modified":"2023-08-11T15:50:35","modified_gmt":"2023-08-11T22:50:35","slug":"verifier-automatiquement-la-case-a-cocher-dun-champ-personnalise","status":"publish","type":"ht_kb","link":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/","title":{"rendered":"V\u00e9rifier automatiquement la case \u00e0 cocher d'un champ personnalis\u00e9"},"content":{"rendered":"<p class=\"wp-block-paragraph\">There may be times when you want a form checkbox to start out in the checked state. &nbsp;You can accomplish this by pasting this script snippet at the top of the page containing the form. You&#8217;ll want to make sure you are in the Text tab in the page editor. In the below code snippet you&#8217;ll replace the # sign with the ID of the custom field. For example, if the ID of the custom field is 2, then you would use&nbsp;name=&#8217;mm_custom_field_2&#8242;<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script>\n\njQuery(function(){\n\n\/\/ repeat the follow 2 lines for each checkbox you want to check off\n\njQuery(\"input&#91;type='checkbox']&#91;name='mm_custom_field_#']\").prop(\"checked\", true);\n\njQuery(\"input&#91;type='checkbox']&#91;name='mm_custom_field_#']\").trigger(\"change\");\n\n});\n\n&lt;\/script><\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Please note that if you are using this checkbox as a confirmation of Terms of Service or something similar, using this option to bypass the user&#8217;s need to check the box manually may not meet legal requirements for consent.<\/p>","protected":false},"excerpt":{"rendered":"<p>Il peut arriver que vous souhaitiez que la case \u00e0 cocher d'un formulaire soit coch\u00e9e au d\u00e9part.  Vous pouvez y parvenir en collant cet extrait de script en haut de...<\/p>","protected":false},"author":20918,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"ht-kb-category":[138],"ht-kb-tag":[],"class_list":["post-7579","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-tips-tricks"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 5.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"There may be times when you want a form checkbox to start out in the checked state. You can accomplish this by pasting this script snippet at the top of the page containing the form. You&#039;ll want to make sure you are in the Text tab in the page editor. In the below code snippet\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Blair\"\/>\n\t<meta name=\"google-site-verification\" content=\"RIQFHn-t5QxsuMU4pLG9xaceb-mmGuRaOWAEU1Q078U\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 5.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"fr_FR\" \/>\n\t\t<meta property=\"og:site_name\" content=\"MemberMouse |\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Automatically Check a Custom Field Checkbox | MemberMouse\" \/>\n\t\t<meta property=\"og:description\" content=\"There may be times when you want a form checkbox to start out in the checked state. You can accomplish this by pasting this script snippet at the top of the page containing the form. You&#039;ll want to make sure you are in the Text tab in the page editor. In the below code snippet\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-08-11T22:50:35+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-08-11T22:50:35+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/membermouse\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@MemberMouse\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Automatically Check a Custom Field Checkbox | MemberMouse\" \/>\n\t\t<meta name=\"twitter:description\" content=\"There may be times when you want a form checkbox to start out in the checked state. You can accomplish this by pasting this script snippet at the top of the page containing the form. You&#039;ll want to make sure you are in the Text tab in the page editor. In the below code snippet\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@MemberMouse\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/docs\\\/automatically-check-a-custom-field-checkbox\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/membermouse.com\\\/fr\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/article-categories\\\/tips\\\/#listItem\",\"name\":\"Tips, Tricks and Customizations\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/article-categories\\\/tips\\\/#listItem\",\"position\":2,\"name\":\"Tips, Tricks and Customizations\",\"item\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/article-categories\\\/tips\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/article-categories\\\/tips-tricks\\\/#listItem\",\"name\":\"Tips and Tricks\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/article-categories\\\/tips-tricks\\\/#listItem\",\"position\":3,\"name\":\"Tips and Tricks\",\"item\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/article-categories\\\/tips-tricks\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/docs\\\/automatically-check-a-custom-field-checkbox\\\/#listItem\",\"name\":\"Automatically Check a Custom Field Checkbox\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/article-categories\\\/tips\\\/#listItem\",\"name\":\"Tips, Tricks and Customizations\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/docs\\\/automatically-check-a-custom-field-checkbox\\\/#listItem\",\"position\":4,\"name\":\"Automatically Check a Custom Field Checkbox\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/article-categories\\\/tips-tricks\\\/#listItem\",\"name\":\"Tips and Tricks\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/#organization\",\"name\":\"MemberMouse\",\"url\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/membermouse\",\"https:\\\/\\\/twitter.com\\\/MemberMouse\",\"https:\\\/\\\/www.instagram.com\\\/membermouse\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/membermouse\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/membermouse\\\/\",\"https:\\\/\\\/soundcloud.com\\\/membermouse\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/author\\\/blaircaseproof-com\\\/#author\",\"url\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/author\\\/blaircaseproof-com\\\/\",\"name\":\"Blair\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/docs\\\/automatically-check-a-custom-field-checkbox\\\/#authorImage\",\"url\":\"https:\\\/\\\/membermouse.com\\\/wp-content\\\/litespeed\\\/avatar\\\/5b6227a6ed29e339c22d01fe541a969c.jpg?ver=1787612394\",\"width\":96,\"height\":96,\"caption\":\"Blair\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/docs\\\/automatically-check-a-custom-field-checkbox\\\/#webpage\",\"url\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/docs\\\/automatically-check-a-custom-field-checkbox\\\/\",\"name\":\"Automatically Check a Custom Field Checkbox | MemberMouse\",\"description\":\"There may be times when you want a form checkbox to start out in the checked state. You can accomplish this by pasting this script snippet at the top of the page containing the form. You'll want to make sure you are in the Text tab in the page editor. In the below code snippet\",\"inLanguage\":\"fr-FR\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/docs\\\/automatically-check-a-custom-field-checkbox\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/author\\\/blaircaseproof-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/author\\\/blaircaseproof-com\\\/#author\"},\"datePublished\":\"2023-08-11T15:50:35-04:00\",\"dateModified\":\"2023-08-11T15:50:35-04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/\",\"name\":\"MemberMouse\",\"inLanguage\":\"fr-FR\",\"publisher\":{\"@id\":\"https:\\\/\\\/membermouse.com\\\/fr\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>Automatically Check a Custom Field Checkbox | MemberMouse<\/title>\n\n","aioseo_head_json":{"title":"V\u00e9rifier automatiquement la case \u00e0 cocher d'un champ personnalis\u00e9 | MemberMouse","description":"Il peut arriver que vous souhaitiez que la case \u00e0 cocher d'un formulaire soit d'abord coch\u00e9e. Pour ce faire, vous pouvez coller cet extrait de script en haut de la page contenant le formulaire. Assurez-vous d'\u00eatre dans l'onglet Texte de l'\u00e9diteur de pages. Dans l'extrait de code ci-dessous","canonical_url":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"RIQFHn-t5QxsuMU4pLG9xaceb-mmGuRaOWAEU1Q078U","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr#listItem","position":1,"name":"Home","item":"https:\/\/membermouse.com\/fr","nextItem":{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr\/article-categories\/tips\/#listItem","name":"Tips, Tricks and Customizations"}},{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr\/article-categories\/tips\/#listItem","position":2,"name":"Tips, Tricks and Customizations","item":"https:\/\/membermouse.com\/fr\/article-categories\/tips\/","nextItem":{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr\/article-categories\/tips-tricks\/#listItem","name":"Tips and Tricks"},"previousItem":{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr\/article-categories\/tips-tricks\/#listItem","position":3,"name":"Tips and Tricks","item":"https:\/\/membermouse.com\/fr\/article-categories\/tips-tricks\/","nextItem":{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/#listItem","name":"Automatically Check a Custom Field Checkbox"},"previousItem":{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr\/article-categories\/tips\/#listItem","name":"Tips, Tricks and Customizations"}},{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/#listItem","position":4,"name":"Automatically Check a Custom Field Checkbox","previousItem":{"@type":"ListItem","@id":"https:\/\/membermouse.com\/fr\/article-categories\/tips-tricks\/#listItem","name":"Tips and Tricks"}}]},{"@type":"Organization","@id":"https:\/\/membermouse.com\/fr\/#organization","name":"MemberMouse","url":"https:\/\/membermouse.com\/fr\/","sameAs":["https:\/\/www.facebook.com\/membermouse","https:\/\/twitter.com\/MemberMouse","https:\/\/www.instagram.com\/membermouse\/","https:\/\/www.youtube.com\/user\/membermouse","https:\/\/www.linkedin.com\/company\/membermouse\/","https:\/\/soundcloud.com\/membermouse"]},{"@type":"Person","@id":"https:\/\/membermouse.com\/fr\/author\/blaircaseproof-com\/#author","url":"https:\/\/membermouse.com\/fr\/author\/blaircaseproof-com\/","name":"Blair","image":{"@type":"ImageObject","@id":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/#authorImage","url":"https:\/\/membermouse.com\/wp-content\/litespeed\/avatar\/5b6227a6ed29e339c22d01fe541a969c.jpg?ver=1787612394","width":96,"height":96,"caption":"Blair"}},{"@type":"WebPage","@id":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/#webpage","url":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/","name":"Automatically Check a Custom Field Checkbox | MemberMouse","description":"There may be times when you want a form checkbox to start out in the checked state. You can accomplish this by pasting this script snippet at the top of the page containing the form. You'll want to make sure you are in the Text tab in the page editor. In the below code snippet","inLanguage":"fr-FR","isPartOf":{"@id":"https:\/\/membermouse.com\/fr\/#website"},"breadcrumb":{"@id":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/#breadcrumblist"},"author":{"@id":"https:\/\/membermouse.com\/fr\/author\/blaircaseproof-com\/#author"},"creator":{"@id":"https:\/\/membermouse.com\/fr\/author\/blaircaseproof-com\/#author"},"datePublished":"2023-08-11T15:50:35-04:00","dateModified":"2023-08-11T15:50:35-04:00"},{"@type":"WebSite","@id":"https:\/\/membermouse.com\/fr\/#website","url":"https:\/\/membermouse.com\/fr\/","name":"MemberMouse","inLanguage":"fr-FR","publisher":{"@id":"https:\/\/membermouse.com\/fr\/#organization"}}]},"og:locale":"fr_FR","og:site_name":"MemberMouse |","og:type":"article","og:title":"Automatically Check a Custom Field Checkbox | MemberMouse","og:description":"There may be times when you want a form checkbox to start out in the checked state. You can accomplish this by pasting this script snippet at the top of the page containing the form. You'll want to make sure you are in the Text tab in the page editor. In the below code snippet","og:url":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/","article:published_time":"2023-08-11T22:50:35+00:00","article:modified_time":"2023-08-11T22:50:35+00:00","article:publisher":"https:\/\/www.facebook.com\/membermouse","twitter:card":"summary_large_image","twitter:site":"@MemberMouse","twitter:title":"Automatically Check a Custom Field Checkbox | MemberMouse","twitter:description":"There may be times when you want a form checkbox to start out in the checked state. You can accomplish this by pasting this script snippet at the top of the page containing the form. You'll want to make sure you are in the Text tab in the page editor. In the below code snippet","twitter:creator":"@MemberMouse"},"aioseo_meta_data":{"post_id":"7579","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"limit_modified_date":false,"reviewed_by":null,"open_ai":null,"created":"2023-10-11 18:09:49","updated":"2026-06-03 03:54:15","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":"2026-06-02 23:39:43","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/membermouse.com\/fr\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/membermouse.com\/fr\/article-categories\/tips\/\" title=\"Tips, Tricks and Customizations\">Tips, Tricks and Customizations<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/membermouse.com\/fr\/article-categories\/tips-tricks\/\" title=\"Tips and Tricks\">Tips and Tricks<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tAutomatically Check a Custom Field Checkbox\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/membermouse.com\/fr"},{"label":"Tips, Tricks and Customizations","link":"https:\/\/membermouse.com\/fr\/article-categories\/tips\/"},{"label":"Tips and Tricks","link":"https:\/\/membermouse.com\/fr\/article-categories\/tips-tricks\/"},{"label":"Automatically Check a Custom Field Checkbox","link":"https:\/\/membermouse.com\/fr\/docs\/automatically-check-a-custom-field-checkbox\/"}],"_links":{"self":[{"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/ht-kb\/7579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/users\/20918"}],"replies":[{"embeddable":true,"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/comments?post=7579"}],"version-history":[{"count":0,"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/ht-kb\/7579\/revisions"}],"wp:attachment":[{"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/media?parent=7579"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/ht-kb-category?post=7579"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/membermouse.com\/fr\/wp-json\/wp\/v2\/ht-kb-tag?post=7579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}