Skip to content

Instantly share code, notes, and snippets.

@michaelbragg
Created February 17, 2016 19:06
Show Gist options
  • Select an option

  • Save michaelbragg/bf4486ee656ac0805273 to your computer and use it in GitHub Desktop.

Select an option

Save michaelbragg/bf4486ee656ac0805273 to your computer and use it in GitHub Desktop.
For CMB2 Issue
/**
* Register the form and fields for our front-end submission form
*/
function cmb2_form() {
$business_category = new_cmb2_box( array(
'id' => 'cmb2_form_categories_business',
'title' => __( 'Business Start Up & Entrepreneur', 'cmb2_form' ),
'object_types' => array( 'cmb2_form', ),
'context' => 'normal',
'priority' => 'high',
'show_names' => 'true',
) );
$business_category->add_field( array(
'name' => __( 'Briefly describe your product or service', 'cmb2_form' ),
'id' => 'cmb2_form_business_describe',
'type' => 'textarea',
) );
$business_category->add_field( array(
'name' => __( 'The Future', 'cmb2_form' ),
'id' => 'cmb2_form_business_future',
'description' => __( 'Please give examples of how and when you/your nominee has demonstrated entrepreneurial innovation and flair, using financial information to support where appropriate.', 'cmb2_form' ),
'type' => 'textarea',
) );
}
add_action( 'cmb2_init', 'cmb2_form' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment