function rules_forms_rules_action_info in Rules 6
Implementation of hook_rules_action_info().
Related topics
File
- rules_forms/
rules_forms.rules.inc, line 52 - Rules integration to provide form support
Code
function rules_forms_rules_action_info() {
return array(
'rules_forms_action_redirect' => array(
'label' => t('Set the redirect target of the form'),
'arguments' => array(
'form' => array(
'type' => 'form',
'label' => t('Form'),
),
'path' => array(
'type' => 'string',
'label' => t('Path'),
),
'query' => array(
'type' => 'string',
'label' => t('Query'),
),
'fragment' => array(
'type' => 'string',
'label' => t('Fragment'),
),
),
'module' => 'Rules Forms',
'help' => t('Enter a Drupal path, path alias, or external URL to redirect to. Enter (optional) queries after "?" and (optional) anchor after "#".'),
),
'rules_forms_action_hide_element' => array(
'label' => t('Hide an element of the form'),
'arguments' => array(
'form' => array(
'type' => 'form',
'label' => t('Form'),
),
'hide' => array(
'type' => 'string',
'label' => t('Form element ID'),
'description' => t('The element that should not appear.') . ' ' . _rules_forms_element_description(),
),
),
'module' => 'Rules Forms',
),
'rules_forms_action_adjust_weight' => array(
'label' => t('Adjust weight of an element in the form'),
'arguments' => array(
'form' => array(
'type' => 'form',
'label' => t('Form'),
),
'element' => array(
'type' => 'string',
'label' => t('Form element ID'),
'description' => t('The element that should be adjusted.') . ' ' . _rules_forms_element_description(),
),
'weight' => array(
'type' => 'number',
'label' => t('Element weight'),
'description' => t('Low numbers make the element bubble up, high numbers sink it down.'),
),
),
'module' => 'Rules Forms',
),
'rules_forms_action_prefix_suffix_html' => array(
'label' => t('Insert HTML prefix/suffix code'),
'arguments' => array(
'form' => array(
'type' => 'form',
'label' => t('Form'),
),
'element' => array(
'type' => 'string',
'label' => t('Form element ID'),
'description' => t('ID of the form element to be targeted.') . ' ' . _rules_forms_element_description(),
),
'prefix' => array(
'type' => 'string',
'label' => t('Prefixed HTML'),
'description' => t('HTML inserted before.'),
),
'suffix' => array(
'type' => 'string',
'label' => t('Suffixed HTML'),
'description' => t('HTML inserted after.'),
),
),
'module' => 'Rules Forms',
),
'rules_forms_action_set_error' => array(
'label' => t('Set a form error'),
'arguments' => array(
'form' => array(
'type' => 'form',
'label' => t('Form'),
),
'element' => array(
'type' => 'string',
'label' => t('Form element ID'),
'description' => t('The element that should be marked.') . ' ' . _rules_forms_element_description(),
),
'message' => array(
'type' => 'string',
'label' => t('Message'),
'description' => t('The message that should be displayed to the user.'),
),
),
'module' => 'Rules Forms',
),
'rules_forms_action_set_element' => array(
'label' => t('Set the default value of a form element'),
'arguments' => array(
'form' => array(
'type' => 'form',
'label' => t('Form'),
),
'element' => array(
'type' => 'string',
'label' => t('Form element ID'),
'description' => t('The element that should be targeted.') . ' ' . _rules_forms_element_description(),
),
'value' => array(
'type' => 'string',
'label' => t('Default value'),
'description' => t('The value(s) that will be displayed as default. If the form element allows multiple values, enter one value per line.'),
),
),
'module' => 'Rules Forms',
),
);
}