function rules_action_add_node_form in Rules 6
Action "Add a node" configuration form
Related topics
File
- rules/
modules/ node.rules_forms.inc, line 80 - Rules configuration forms for the node module
Code
function rules_action_add_node_form($settings, &$form) {
$form['settings']['type'] = array(
'#type' => 'select',
'#title' => t('Content type to be used'),
'#options' => node_get_types('names'),
'#default_value' => isset($settings['type']) ? $settings['type'] : '',
'#description' => t('Select a content type that will be created when this action is invoked.'),
'#required' => TRUE,
);
$form['settings']['node_access'] = array(
'#type' => 'checkbox',
'#title' => t('Create content only if the given author has access permission to do so'),
'#default_value' => isset($settings['node_access']) ? $settings['node_access'] : 0,
);
}