function rules_forms_activate_confirm_form in Rules Forms Support 7.2
Same name and namespace in other branches
- 7 includes/rules_forms.admin.inc \rules_forms_activate_confirm_form()
Confirmation form to activate events on a form.
1 string reference to 'rules_forms_activate_confirm_form'
- rules_forms_activate in includes/
rules_forms.admin.inc - Activation page for a form ID.
File
- includes/
rules_forms.admin.inc, line 99 - Administrative forms for Rules Forms module.
Code
function rules_forms_activate_confirm_form($form, &$form_state, $form_id_activate, $form_page) {
$default_form_label = drupal_ucfirst(str_replace('_', ' ', $form_id_activate));
$form = array();
$form['form_id_label'] = array(
'#type' => 'textfield',
'#title' => t('Custom form label'),
'#default_value' => $default_form_label,
'#required' => TRUE,
'#description' => t('Enter a custom label for use in the administration user interface.'),
);
$form_state['form_id_activate'] = $form_id_activate;
$form_state['form_page'] = $form_page;
// Users should go back to where they came from when canceling the
// confirmation form.
$path = array(
'path' => urldecode($form_page),
);
$title = t('Are you sure you want to activate events for %form?', array(
'%form' => $form_id_activate,
));
$msg = t('Once the activation is confirmed, events on this form can be used to trigger rules.');
return confirm_form($form, $title, $path, $msg, t('Activate'));
}