I want to record the working hours from my prospects, so I need a flexible to and from field, like:

9-5, 8-5 etc...

I could do drop down selects, but I would rather have it custom, so a double drop down selection field, a little like the date field but only for hours , no date, month etc...


This is not currently available in CiviCRM to have time range custom field. The alternate solution would be to create two date time field To and From and using buildForm hook and PageRun hook and/or JS hide the date field on forms and view.




A more basic solution would be two integer, number or text 'select' fields ie with 8.00, 8.30, 9.00 etc

but it depends whether the data is based on hour, half hour, or by the minute

  • Hour is fine, but i need the fields inline select side by side horizintally, so could use float left css for it – Bruno Vincent Oct 12 '18 at 0:29
  • or if drupal do as webform and use layout component – petednz - fuzion Oct 12 '18 at 6:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.