By cardina1 on
Hello,
I can't find any clear example of use of form API element "date_repeat_rrule" declared by Date repeat API (Date API 6.x-2.2) module. I can't get RRULE after form submition. May be somebody already used this element, or saw the article with good example, please, let me know.
Form array is:
function mymodule_edit_form(&$form_state)
{
$form = array();
$form['date'] = array(
'#type' => 'date_repeat_rrule',
'#date_format' => ' d M Y',
'#date_label_position' => 'above',
'#date_repeat_collapsed' => true,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
'#weight' => 10,
);
return $form;
}
but when I submit this form I get $form_state['values'] the following:
[date] =>
[INTERVAL] => 1
[FREQ] => DAILY
[UNTIL] => Array
(
[datetime] => 2008-04-12 00:00:00
[tz] =>
[all_day] => 1
[granularity] => a:3:{i:0;s:4:"year";i:1;s:5:"month";i:2;s:3:"day";}
)
[BYMONTH] => Array
(
[2] => 2
)
[BYMONTHDAY] => Array
(
[3] => 3
)
[BYDAY] => Array
(
[WE] => WE
)
[0] => Array
(
[datetime] => 2008-02-19 00:00:00
[tz] =>
[all_day] => 1
[granularity] => a:3:{i:0;s:4:"year";i:1;s:5:"month";i:2;s:3:"day";}
)
[op] => Save
[submit] => Save
[form_build_id] => form-3d8df8b5e1116d3d5a14c03ef9f01848
[form_token] => 2e32a5518dcf508fa6a128bcf39d3f13
[form_id] => mymodule_edit_form
There is no RRULE that I can save to database for example. But the parts of it mixed with excepting dates.
Comments
same problem
I have the same problem. Do you have already a solution?