Hello developers, I maintain a number of modules that are related to doing something at a user defined interval, e.g. every 30 minutes or 12 hours etc. Most times I just use a single select box and pre-generate some options that I think users will want, but of course some users (myself included) want to be able choose an exact, but custom, interval. Is there any module out there that provides a generic 'interval' form element? I've looked at core, and it just uses some custom code each time to generate a list of intervals and pop them in a select list. I've also looked at other contrib modules and some of them just provide a textfield and others provide a textfield for numeric input and a select list for 'units'. There doesn't seem to be a catch-all solution that I can find, and everyone seems to implementing intervals in a slightly different way. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 024 7666 7277 Mobile : 07702 131 576 Twitter : darthsteven http://www.computerminds.co.uk
Le 12/05/2011 08:32, Steven Jones a écrit :
I've looked at core, and it just uses some custom code each time to generate a list of intervals and pop them in a select list. I've also looked at other contrib modules and some of them just provide a textfield and others provide a textfield for numeric input and a select list for 'units'. There doesn't seem to be a catch-all solution that I can find, and everyone seems to implementing intervals in a slightly different way.
In one of my module, I use a select list with prefined values to quickly fill a textfield with a choice. Then user can modify this textfield if they don't like any of these predefined values. Take a look at http://drupal.org/project/hidden_comment -- Hai-Nam Nguyen aka jcisio http://jcisio.com
Check out date_repeat, which comes as a part of the date module. Thanks, Cameron On Thu, May 12, 2011 at 01:45, Hai-Nam aka jcisio <jcisio@gmail.com> wrote:
Le 12/05/2011 08:32, Steven Jones a écrit :
I've looked at core, and it just uses some custom code each time to generate a list of intervals and pop them in a select list. I've also looked at other contrib modules and some of them just provide a textfield and others provide a textfield for numeric input and a select list for 'units'. There doesn't seem to be a catch-all solution that I can find, and everyone seems to implementing intervals in a slightly different way.
In one of my module, I use a select list with prefined values to quickly fill a textfield with a choice. Then user can modify this textfield if they don't like any of these predefined values.
Take a look at http://drupal.org/project/hidden_comment
-- Hai-Nam Nguyen aka jcisio http://jcisio.com
Hello, Thanks for the responses, but going back to my original question:
Is there any module out there that provides a generic 'interval' form element?
The answer seems to be: 'No'. I might write one. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 024 7666 7277 Mobile : 07702 131 576 Twitter : darthsteven http://www.computerminds.co.uk On 12 May 2011 16:29, Cameron Eagans <cweagans@gmail.com> wrote:
Check out date_repeat, which comes as a part of the date module. Thanks, Cameron
On Thu, May 12, 2011 at 01:45, Hai-Nam aka jcisio <jcisio@gmail.com> wrote:
Le 12/05/2011 08:32, Steven Jones a écrit :
I've looked at core, and it just uses some custom code each time to generate a list of intervals and pop them in a select list. I've also looked at other contrib modules and some of them just provide a textfield and others provide a textfield for numeric input and a select list for 'units'. There doesn't seem to be a catch-all solution that I can find, and everyone seems to implementing intervals in a slightly different way.
In one of my module, I use a select list with prefined values to quickly fill a textfield with a choice. Then user can modify this textfield if they don't like any of these predefined values.
Take a look at http://drupal.org/project/hidden_comment
-- Hai-Nam Nguyen aka jcisio http://jcisio.com
There is a duration module: http://drupal.org/project/duration On Fri, May 13, 2011 at 4:21 AM, Steven Jones < steven.jones@computerminds.co.uk> wrote:
Hello,
Thanks for the responses, but going back to my original question:
Is there any module out there that provides a generic 'interval' form element?
The answer seems to be: 'No'. I might write one.
Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites
Phone : 024 7666 7277 Mobile : 07702 131 576 Twitter : darthsteven http://www.computerminds.co.uk
On 12 May 2011 16:29, Cameron Eagans <cweagans@gmail.com> wrote:
Check out date_repeat, which comes as a part of the date module. Thanks, Cameron
On Thu, May 12, 2011 at 01:45, Hai-Nam aka jcisio <jcisio@gmail.com> wrote:
Le 12/05/2011 08:32, Steven Jones a écrit :
I've looked at core, and it just uses some custom code each time to generate a list of intervals and pop them in a select list. I've also looked at other contrib modules and some of them just provide a textfield and others provide a textfield for numeric input and a select list for 'units'. There doesn't seem to be a catch-all solution that I can find, and everyone seems to implementing intervals in a slightly different way.
In one of my module, I use a select list with prefined values to quickly fill a textfield with a choice. Then user can modify this textfield if they don't like any of these predefined values.
Take a look at http://drupal.org/project/hidden_comment
-- Hai-Nam Nguyen aka jcisio http://jcisio.com
Sounds like Select (or other) module. Aka select_or_other. On May 12, 2011, at 12:32 AM, Steven Jones <steven.jones@computerminds.co.uk> wrote:
Hello developers,
I maintain a number of modules that are related to doing something at a user defined interval, e.g. every 30 minutes or 12 hours etc. Most times I just use a single select box and pre-generate some options that I think users will want, but of course some users (myself included) want to be able choose an exact, but custom, interval.
Is there any module out there that provides a generic 'interval' form element?
I've looked at core, and it just uses some custom code each time to generate a list of intervals and pop them in a select list. I've also looked at other contrib modules and some of them just provide a textfield and others provide a textfield for numeric input and a select list for 'units'. There doesn't seem to be a catch-all solution that I can find, and everyone seems to implementing intervals in a slightly different way.
Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites
Phone : 024 7666 7277 Mobile : 07702 131 576 Twitter : darthsteven http://www.computerminds.co.uk
participants (5)
-
Arlin Sandbulte -
Cameron Eagans -
Hai-Nam aka jcisio -
Nathan Haug -
Steven Jones