Posted by Maestro232 on April 11, 2012 at 8:25pm
I would like to modify the "Time" field type in a webform (from webform module) such that the minutes selector has only ":00" and ":30" as values. I'd only like this change to apply to a single form. Is this possible?

Comments
One possibility
Looks like there is a patch you can try.
http://drupal.org/node/434584
This is a D7 patch...
Thanks for the heads up. This appears to be a D7 patch and we're on D6. Any ideas?
As suggested in the link
As suggested in the link above, a similar patch could be applied to D6.
An expedient fix is to edit this file:
/modules/webform/components/time.inc
and change this:
for ($i = 0; $i <= 59; $i++) $minutes[$i] = $i < 10 ? "0$i" : $i;
to this:
for ($i = 0; $i <= 59;) { $minutes[$i] = $i < 10 ? "0$i" : $i; $i += 30; }
It seems....
It seems to me that the patch gave the user flexibilty in adjusting the increments by element, but the change above would force that change on any time element in any webform I make, correct?
True enough...
Yup, this (same result as version above) would limit all webform times to 00 or 30 no matter what.
for ($i = 0; $i <= 59; $i+=30) $minutes[$i] = $i < 10 ? "0$i" : $i;
well..
Well, it's not the most flexible solution, but I hard-coded it to 15 minute increments instead of 30 and I think that will be reasonable for any forms I need to make on this particular domain. Thanks for the help.
If you were up to it and had
If you were up to it and had the time (and we rarely do) you could adapt that D7 patch for D6 and put it up at drupal.org.