Skip to content

cmb2_before_form

github-actions[bot] edited this page Jun 25, 2026 · 1 revision

Hook before form table begins

Usually post (this applies to all post-types). Could also be comment, user or options-page.

Auto-generated Example

add_action(
   'cmb2_before_form',
    function(
        array $cmb_id,
        int $object_id,
        string $object_type,
        array $cmb
    ) {
        // Your code here.
    },
    10,
    4
);

Parameters

  • array $cmb_id The current box ID.
  • int $object_id The ID of the current object.
  • string $object_type The type of object you are working with.
  • array $cmb This CMB2 object.

Files

do_action( 'cmb2_before_form', $this->cmb_id, $object_id, $object_type, $this )

← All Hooks

Clone this wiki locally