Home / Admin / Customize Ambassador Campaign Fields For Campaign Creators
Duplicate Snippet

Embed Snippet on Your Site

Customize Ambassador Campaign Fields For Campaign Creators

*BETA* code snippet that should show you can hide short description field and update labels in the Ambassador extensions create/edit campaign fields for front end campaign creators.

David Bisset PRO
<10
Code Preview
php
<?php
add_action( 'charitable_default_campaign_fields', 'test_charitable_default_campaign_fields', 10, 1 );
function test_charitable_default_campaign_fields( $form_fields ) {
  // make the short description hidden, don't remove as this make cause problems with legacy code.
  if ( isset( $form_fields['description']['campaign_form'] ) ) {
    $form_fields['description']['campaign_form']['type'] = 'hidden';
  }
  // change the labels based on the slug of the field.
  if ( isset( $form_fields['categories']['campaign_form'] ) ) {
    $form_fields['categories']['campaign_form']['label'] = 'Categories (Update these to reflect the categories you want to use)';
  }
  return $form_fields;
}

Comments

Add a Comment