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.
Create a date widget and have it include a required "To" field. Name the new field "Event". The results on the form become "Event From date" and "Event To date", when I expected "Event from date" and "Event to date".
Comments
Comment #1
heacu CreditAttribution: heacu commentedactually these labels should be customizable because they are useless as is.
it makes most sense to call the field something like Event Duration. then you'd get Event Duration From Date, and Event Duration To Date, both of which sound silly.
best if the labels for all three bits can be changed in the admin interface.
Comment #2
Morbus IffI'm actually not that concerned about what the field labels /say/ so much as how they /look/ - Drupal formats all its string as sentence case, not title case, so "Event Duration From Date" is actually *worse*, since you've capitalized *everything* ;)
Comment #3
heacu CreditAttribution: heacu commentedwell, if you want this part of the module to work straight out of the box in a usable way, then attention to the "from" and "to" labels would be helpful. i can't see anybody using this part of it directly w/o either re-theming in PHP or overriding with javascript
Comment #4
KarenS CreditAttribution: KarenS commentedThis was an attempt to get the validation error messages to show which date value they belonged on, but it wasn't working right anyway. I reworked the labels so the labels only say 'From date' and 'To date' and other information is added only for error messages.