Fabrik 3.8.1 has been released. It is mostly bug fixes and feature enhancements, but does include two new plugins (push notifications, and the sequence element). As usual we strongly recommend testing the new release on a sandbox if your application is mission critical, and always do an Akeeba backup before updating.
Time element is useful if you need just a time value (as time of day or duration). This is derived from birthday element. While birthday uses database field type DATE instead DATETIME, time element uses TIME field type. The two together are useful when using Fabrik for manipulating data of such event management components as EventList where date and time fields are separate fields and empty fields should have NULL value.
Time data is submitted with dropdowns, by default they are three - hours, minutes and seconds.
Admin form allows you choose time formatting - all 3 parts, hours and minutes or minutes and seconds. Additionally you can choose which separator should be between hours, minutes and seconds (it's : by default)
PHP Validation Example (top)
Check if 'endtime' element is set to be 2 hours after 'starttime' element:
$app = JFactory::getApplication();
$input = $app->input;
$startTime = $input->get('multipage___starttime_raw', array(), 'array');
$endTime = $input->get('multipage___endtime_raw', array(), 'array');
$startSeconds = ($startTime * 60 * 60) + ($startTime * 60) + $startTime;
$endSeconds = ($endTime * 60 * 60) + ($endTime * 60) + $endTime;
if ($endSeconds - (2 * 60 * 60) < $startSeconds)
nasreddine likes this.