{"id":4676,"date":"2026-02-24T09:55:40","date_gmt":"2026-02-24T15:55:40","guid":{"rendered":"https:\/\/racmanuel.dev\/?post_type=docs&#038;p=4676"},"modified":"2026-02-24T09:55:42","modified_gmt":"2026-02-24T15:55:42","password":"","slug":"checklist","status":"publish","type":"docs","link":"https:\/\/racmanuel.dev\/en\/docs\/custom-fields-booster\/checklist\/","title":{"rendered":"Checklist"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Provides a checklist UI with optional progress and storage modes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The field stores selected items as an array of indexes or labels based on the chosen mode.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"use-cases\">Use Cases<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Track content review tasks<\/li>\n\n\n\n<li>Collect completion status for onboarding steps<\/li>\n\n\n\n<li>Record compliance checks<\/li>\n\n\n\n<li>Store per-entry progress lists<\/li>\n\n\n\n<li>Maintain editorial checklists<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"field-preview\">Field Preview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A list of checkboxes with optional progress text and a progress bar.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-use\">How to Use<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add the Checklist field to a Field Group.<\/li>\n\n\n\n<li>Enter <strong>Items<\/strong> (one per line).<\/li>\n\n\n\n<li>Enable <strong>Show progress<\/strong> if desired.<\/li>\n\n\n\n<li>Choose <strong>Columns<\/strong> (1 or 2).<\/li>\n\n\n\n<li>Toggle <strong>Editable<\/strong>.<\/li>\n\n\n\n<li>Select <strong>Store value as<\/strong> (Number or Name).<\/li>\n\n\n\n<li>Save the Field Group and edit a post.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"field-settings\">Field Settings<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Setting<\/th><th>Description<\/th><th>Default<\/th><\/tr><tr><td>Items<\/td><td>One item per line<\/td><td>Item 1, Item 2, Item 3<\/td><\/tr><tr><td>Show progress<\/td><td>Show completed count and a progress bar<\/td><td>1<\/td><\/tr><tr><td>Columns<\/td><td>Layout columns for items (1 or 2)<\/td><td>1<\/td><\/tr><tr><td>Editable<\/td><td>Allow editors to check\/uncheck items<\/td><td>1<\/td><\/tr><tr><td>Store value as<\/td><td>Save by item position or item text<\/td><td>index<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Notes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Stored values are normalized, de-duplicated, and sorted.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"value-storage\">Value &amp; Storage<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Saved as: Post meta<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Storage type: Array<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Return format: array<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">REST format: not specified<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Saved structure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Array of integers (1-based positions) when store mode is <code>index<\/code><\/li>\n\n\n\n<li>Array of strings (item labels) when store mode is <code>label<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Important details:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Invalid values are discarded during normalization.<\/li>\n\n\n\n<li>Required validation enforces at least one selection when enabled.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"output-examples\">Output Examples<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"php\">JavaScript<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">$selected = get_field('my_checklist');\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"twig\">Twig<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">{% set selected = fn('get_field', 'my_checklist') %}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"compatibility\">Compatibility<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Repeaters<\/li>\n\n\n\n<li>Flexible Content<\/li>\n\n\n\n<li>Options Pages<\/li>\n\n\n\n<li>Frontend forms (acf_form)<\/li>\n\n\n\n<li>REST API<\/li>\n\n\n\n<li>Multisite<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"hooks-developer\">Hooks (Developer)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"hooks-summary\">Hooks Summary<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Hook<\/th><th>Type<\/th><th>Purpose<\/th><\/tr><tr><td>custom_fields_booster_checklist_defaults<\/td><td>Filter<\/td><td>Modify default settings.<\/td><\/tr><tr><td>custom_fields_booster_checklist_supports<\/td><td>Filter<\/td><td>Modify ACF support flags.<\/td><\/tr><tr><td>custom_fields_booster_checklist_before_settings<\/td><td>Action<\/td><td>Run logic before rendering settings UI.<\/td><\/tr><tr><td>custom_fields_booster_checklist_after_settings<\/td><td>Action<\/td><td>Run logic after rendering settings UI.<\/td><\/tr><tr><td>custom_fields_booster_checklist_before_enqueue<\/td><td>Action<\/td><td>Run logic before enqueuing assets.<\/td><\/tr><tr><td>custom_fields_booster_checklist_after_enqueue<\/td><td>Action<\/td><td>Run logic after enqueuing assets.<\/td><\/tr><tr><td>custom_fields_booster_checklist_before_render<\/td><td>Action<\/td><td>Run logic before rendering UI.<\/td><\/tr><tr><td>custom_fields_booster_checklist_after_render<\/td><td>Action<\/td><td>Run logic after rendering UI.<\/td><\/tr><tr><td>custom_fields_booster_checklist_store_mode<\/td><td>Filter<\/td><td>Override storage mode.<\/td><\/tr><tr><td>custom_fields_booster_checklist_is_editable<\/td><td>Filter<\/td><td>Override editable state.<\/td><\/tr><tr><td>custom_fields_booster_checklist_items<\/td><td>Filter<\/td><td>Modify checklist items.<\/td><\/tr><tr><td>custom_fields_booster_checklist_wrapper_attrs<\/td><td>Filter<\/td><td>Modify wrapper attributes.<\/td><\/tr><tr><td>custom_fields_booster_checklist_progress_template<\/td><td>Filter<\/td><td>Customize progress text.<\/td><\/tr><tr><td>custom_fields_booster_checklist_after_ui<\/td><td>Action<\/td><td>Runs after the checklist UI block.<\/td><\/tr><tr><td>custom_fields_booster_checklist_update_value<\/td><td>Filter<\/td><td>Modify value before save.<\/td><\/tr><tr><td>custom_fields_booster_checklist_item_completed<\/td><td>Action<\/td><td>Fires for each newly completed item on save.<\/td><\/tr><tr><td>custom_fields_booster_checklist_completed_all<\/td><td>Action<\/td><td>Fires when all items are completed on save.<\/td><\/tr><tr><td>custom_fields_booster_checklist_updated_value<\/td><td>Action<\/td><td>Fires after normalization before save.<\/td><\/tr><tr><td>custom_fields_booster_checklist_load_value<\/td><td>Filter<\/td><td>Modify value after loading.<\/td><\/tr><tr><td>custom_fields_booster_checklist_validate_value<\/td><td>Filter<\/td><td>Modify validation result.<\/td><\/tr><tr><td>custom_fields_booster_checklist_format_value<\/td><td>Filter<\/td><td>Modify value returned by <code>get_field()<\/code>.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"filters\">Filters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Filter:<\/strong> <code>custom_fields_booster_checklist_store_mode<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Purpose: Override the storage mode.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When: You need to force a consistent mode across fields.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_filter('custom_fields_booster_checklist_store_mode', function ($mode, $field, $post_id) {\n    return 'label';\n}, 10, 3);\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Filter:<\/strong> <code>custom_fields_booster_checklist_items<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Purpose: Modify the items list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When: You need to add or remove items dynamically.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_filter('custom_fields_booster_checklist_items', function ($items, $field, $post_id) {\n    $items[] = 'New item';\n    return $items;\n}, 10, 3);\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Filter:<\/strong> <code>custom_fields_booster_checklist_update_value<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Purpose: Modify the normalized value before save.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When: You need to transform stored values.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_filter('custom_fields_booster_checklist_update_value', function ($selected, $value, $post_id, $field, $store_mode) {\n    return $selected;\n}, 10, 5);\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"actions\">Actions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Action:<\/strong> <code>custom_fields_booster_checklist_after_ui<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Runs after the checklist UI block renders.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_action('custom_fields_booster_checklist_after_ui', function ($field, $post_id, $selected, $total, $store_mode) {\n    \/\/ Custom logic.\n}, 10, 5);\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"assets\">Assets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This field enqueues assets whenever the input is rendered (admin and frontend via <code>acf_form()<\/code>):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>admin\/js\/cfb-field-checklist.js<\/code><\/li>\n\n\n\n<li><code>admin\/css\/cfb-field-checklist.css<\/code><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"rest-api\">REST API<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Schema: not specified<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"rest-validation\">REST Validation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Standard ACF validation only.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"security-escaping\">Security &amp; Escaping<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Output escapes attributes and labels in the field UI.<\/li>\n\n\n\n<li><code>escaping_html<\/code> support is disabled for this field.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"notes-limitations\">Notes \/ Limitations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Items are re-indexed from 1 based on the configured list.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"changelog\">Changelog<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1.0.0 \u2014 Initial release<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Provides a checklist UI with optional progress and storage modes. The field stores selected items as an array of indexes or labels based on the chosen mode. Use Cases Field Preview A list of checkboxes with optional progress text and a progress bar. How to Use Field Settings Setting Description Default Items One item per [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_gspb_post_css":"","_glsr_average":0,"_glsr_ranking":0,"_glsr_reviews":0,"footnotes":""},"doc_category":[96],"doc_tag":[102],"class_list":["post-4676","docs","type-docs","status-publish","hentry","doc_category-custom-fields-booster","doc_tag-free"],"blocksy_meta":[],"year_month":"2026-06","word_count":676,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"racmanuel","author_nicename":"ra_cm","author_url":"https:\/\/racmanuel.dev\/en\/author\/ra_cm\/"},"doc_category_info":[{"term_name":"Custom Fields Booster","term_url":"https:\/\/racmanuel.dev\/en\/docs\/category\/custom-fields-booster\/"}],"doc_tag_info":[{"term_name":"Free","term_url":"https:\/\/racmanuel.dev\/en\/docs\/tag\/free\/"}],"acf":[],"_links":{"self":[{"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/docs\/4676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/comments?post=4676"}],"version-history":[{"count":1,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/docs\/4676\/revisions"}],"predecessor-version":[{"id":4677,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/docs\/4676\/revisions\/4677"}],"wp:attachment":[{"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/media?parent=4676"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/doc_category?post=4676"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/doc_tag?post=4676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}