function date_repeat_rrule_validate in Date 5.2
Same name and namespace in other branches
- 8 date_repeat/date_repeat_form.inc \date_repeat_rrule_validate()
- 6.2 date_repeat/date_repeat_form.inc \date_repeat_rrule_validate()
- 6 date_repeat/date_repeat_form.inc \date_repeat_rrule_validate()
- 7.3 date_repeat/date_repeat_form.inc \date_repeat_rrule_validate()
- 7 date_repeat/date_repeat_form.inc \date_repeat_rrule_validate()
- 7.2 date_repeat/date_repeat_form.inc \date_repeat_rrule_validate()
Build an RRULE out of the form values.
File
- date_repeat/
date_repeat_form.inc, line 247 - Code to add a date repeat selection form to a date field and create an iCal RRULE from the chosen selections.
Code
function date_repeat_rrule_validate($element) {
require_once './' . drupal_get_path('module', 'date_api') . '/date_api_ical.inc';
global $form_values;
$field_name = $element['#parents'][0];
$item = $form_values[$field_name]['rrule'];
$item = date_repeat_merge($item, $element);
$rrule = date_api_ical_build_rrule($item);
form_set_value($element, $rrule);
}