You are here

function custom_pub_on_action_form in Custom Publishing Options 7

Same name and namespace in other branches
  1. 6 custom_pub.module \custom_pub_on_action_form()

Implements a configurable action form.

Allows the user to pick custom publishing options to turn on.

Parameters

$context:

Return value

array

File

./custom_pub.module, line 282
Adds the ability to add Custom publishing options to the node Add/Edit forms.

Code

function custom_pub_on_action_form($context) {
  $pub_types = custom_pub_types_list();
  $form['types'] = array(
    '#title' => t('Custom Publishing Options'),
    '#description' => t('Select the Custom publishing options to toggle on when this action is triggered.'),
    '#type' => 'checkboxes',
    '#options' => $pub_types,
    '#default_value' => isset($context['types']) ? $context['types'] : array(),
  );
  return $form;
}