Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'd like to use a week sub-element in the form element in my form.
However, the labels set in timeperiod_element_process() are taken from timeperiod_element_units() without any opportunity to customize them.
How about making it so you can do this:
'#units' => array(
'604800' => array('max' => 52, 'step size' => 1, 'label' => t('weeks')),
'3600' => array('max' => 23, 'step size' => 1),
'60' => array('max' => 55, 'step size' => 5),
),
A week period would be a useful addition to this module too :)
Comment | File | Size | Author |
---|---|---|---|
#1 | 1700422.timeperiod.customize-unit-suffix.patch | 1.46 KB | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedHere's a patch.
Comment #2
ñull CreditAttribution: ñull commentedI would need this too. Please submit and release!