{"id":30121,"date":"2022-11-04T10:14:15","date_gmt":"2022-11-04T10:14:15","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/"},"modified":"2023-07-14T13:26:03","modified_gmt":"2023-07-14T13:26:03","slug":"updating-checkbox-field-via-rest-api","status":"publish","type":"tips-and-tricks","link":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/","title":{"rendered":"Updating Checkbox Field via Rest API"},"content":{"rendered":"\n<p>Let\u2019s say you\u2019ve got a <strong>Custom Content Type<\/strong> with a <strong>Checkbox <\/strong>meta field. You are transferring data from site A to site B via Rest API. You also have a dedicated <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/jetengine-how-to-add-and-edit-cct-items-remotely-using-rest-api\/#title6\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Add New CCT item form<\/strong><\/a> that lets you quickly submit a new \u0421\u0421T item.<\/p>\n\n\n\n<h2 class=\"wp-block-heading item-1\" id=\"check-the-checkbox-fields\"><strong>Check the Checkbox Fields<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p class=\"offset\">Every <strong>Checkbox <\/strong>field should be saved as an array.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/checkbox-saved-as-array.png\" alt=\"save as array checkbox meta field option\">\n\n\n\n<p class=\"offset\">Please note that if you already created the CCT items with the checkbox fields checked, you need to check the values and resave the items so that the data would be saved in the database. You can also use the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/jetengine-glossaries-functionality-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Glossary<\/strong><\/a> for the Checkbox field.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading item-2\" id=\"create-the-checkboxes-field-in-the-new-cct-item-form\"><strong>Create the Checkboxes field in the New CCT Item Form<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p class=\"offset\">On site B go to the <em>JetFormBuilder<\/em> tab and find your form. Click the \u201c<strong>Edit<\/strong>\u201d button and add a new <a href=\"https:\/\/jetformbuilder.com\/features\/checkbox-field\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Checkbox Field<\/strong><\/a><strong> <\/strong>to it. If there is already a field in the form, you can start editing it.<\/p>\n\n\n\n<p class=\"offset\">Option 1:<\/p>\n\n\n\n<p class=\"offset\">Manual input &#8211; This means that you can insert the option values manually. Click the \u201c<strong>Manage Items<\/strong>\u201d button and see the <strong>Edit Manual Options<\/strong> pop-up window.<\/p>\n\n\n\n<p class=\"offset\">You can define the option\u2019s title and value in the <strong>Label <\/strong>and <strong>Value <\/strong>fields. Use the <strong>Calculate <\/strong>field when you want to apply a calculable number to the option\u2019s value. That number can afterward be used in the <a href=\"https:\/\/jetformbuilder.com\/features\/calculated-field\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Calculated Field<\/strong><\/a>.<\/p>\n\n\n\n<p class=\"offset\">You can add as many options as you need by clicking the \u201c<strong>Add New Option<\/strong>\u201d button.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/manual-input-cct-rest-api.png\" alt=\"form checkbox field manual option\">\n\n\n\n<p class=\"offset\">Please note that you need to duplicate the values and labels from site A to site B.<\/p>\n\n\n\n<p class=\"offset\">Option 2:<\/p>\n\n\n\n<p class=\"offset\">Glossary &#8211; Copy the values and labels and create a new <strong>Glossary <\/strong>on site B.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/03\/cct-rest-glossary-full-1024x927.png\" alt=\"glossary options\">\n\n\n\n<p class=\"offset\">Then you can use this <strong>Glossary <\/strong>in the form.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/glossary-cct-rest-api-form.png\" alt=\"glossary options in form field\">\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading item-3\" id=\"create-a-request\"><strong>Create a Request<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p class=\"offset\">When the form fields are ready, go to the <strong>Post-submit Actions\/Notification Settings<\/strong> section, press \u201c<strong>New Action<\/strong>,\u201d and choose the \u201cREST API Request\u201d option. Then press the pencil-shaped button to edit the action.<\/p>\n\n\n\n<p class=\"offset\">Paste the Endpoint URL to the <strong>REST API URL<\/strong> field.&nbsp;<\/p>\n\n\n\n<p class=\"offset\">The <strong>Custom Body <\/strong>text area is for the JSON code of the request. Here you need to define the connections between the form fields and the CCT meta fields.<\/p>\n\n\n\n<p class=\"offset\">The result should be the following, where the \u201ctemperament\u201d, for example, is the name of the meta field from the website A and the second \u201c%temperament|render_acf_checkbox%\u201d is the macro with the form field name:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/03\/render-acf-checkbox-cct-rest-api-full-1024x502.png\" alt=\"custom body in rest api form action site a\">\n\n\n\n<p class=\"offset\">There is another option: the second %temperament% is the macro with the form field name; you can write the field without quotes, and it will work.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/03\/cct-rest-form-field-full-1024x487.png\" alt=\"custom body in rest api form action site b\">\n\n\n\n<p class=\"offset\">Don\u2019t forget to click the \u201c<strong>Update<\/strong>\u201d and \u201c<strong>Publish<\/strong>\u201d buttons when you finish editing.<\/p>\n<\/div><\/div>\n\n\n\n<p>Place the form on any page, fill in the fields, and hit the \u201c<strong>Submit<\/strong>\u201d button. Check if the new item appears on the main website with the saved <strong>Checkbox <\/strong>field.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a tip on how to set and safely update the checkbox field type with the REST API feature. <\/p>\n","protected":false},"author":1,"featured_media":0,"template":"","format":"standard","tipstricks-tags":[359],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Updating Checkbox Field via Rest API | Crocoblock<\/title>\n<meta name=\"description\" content=\"Find out how to update the Checkbox field built with the JetEngine plugin via Rest API. Solve the issue using the WordPress form built with JetFormBuilder.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Updating Checkbox Field via Rest API | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Find out how to update the Checkbox field built with the JetEngine plugin via Rest API. Solve the issue using the WordPress form built with JetFormBuilder.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-14T13:26:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/checkbox-saved-as-array.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/\",\"name\":\"Updating Checkbox Field via Rest API | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2022-11-04T10:14:15+00:00\",\"dateModified\":\"2023-07-14T13:26:03+00:00\",\"description\":\"Find out how to update the Checkbox field built with the JetEngine plugin via Rest API. Solve the issue using the WordPress form built with JetFormBuilder.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tips & tricks\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Updating Checkbox Field via Rest API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"name\":\"Help Center\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\",\"name\":\"Help Center\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"contentUrl\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"caption\":\"Help Center\"},\"image\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Updating Checkbox Field via Rest API | Crocoblock","description":"Find out how to update the Checkbox field built with the JetEngine plugin via Rest API. Solve the issue using the WordPress form built with JetFormBuilder.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/","og_locale":"en_US","og_type":"article","og_title":"Updating Checkbox Field via Rest API | Crocoblock","og_description":"Find out how to update the Checkbox field built with the JetEngine plugin via Rest API. Solve the issue using the WordPress form built with JetFormBuilder.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/","og_site_name":"Help Center","article_modified_time":"2023-07-14T13:26:03+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/checkbox-saved-as-array.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/","url":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/","name":"Updating Checkbox Field via Rest API | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2022-11-04T10:14:15+00:00","dateModified":"2023-07-14T13:26:03+00:00","description":"Find out how to update the Checkbox field built with the JetEngine plugin via Rest API. Solve the issue using the WordPress form built with JetFormBuilder.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/updating-checkbox-field-via-rest-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Tips & tricks","item":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/"},{"@type":"ListItem","position":3,"name":"Updating Checkbox Field via Rest API"}]},{"@type":"WebSite","@id":"https:\/\/crocoblock.com\/knowledge-base\/#website","url":"https:\/\/crocoblock.com\/knowledge-base\/","name":"Help Center","description":"","publisher":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization","name":"Help Center","url":"https:\/\/crocoblock.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","contentUrl":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","caption":"Help Center"},"image":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/tips-and-tricks\/30121"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/tips-and-tricks"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/tips-and-tricks"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=30121"}],"wp:term":[{"taxonomy":"tipstricks-tags","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/tipstricks-tags?post=30121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}