Active
Project:
Decisions
Version:
6.x-1.7
Component:
Code - Base Decisions module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2010 at 01:48 UTC
Updated:
28 Oct 2010 at 02:11 UTC
Hmmm. Im trying to hide date options from users by setting fieldset ['#type'] = 'value' in hook_form_alter. To do that I need to set date fields ['#required'] = FALSE;
All looks good, some other options when hidden works well except for date, it throws error 'warning: gmmktime() expects parameter 5 to be long, string given in decisions.module on line 1749.'
It saves default values, but its not enough. $form['settings']['date']['#type'] = 'value'; maked this error to appear. When this line is not in code, everything saves without error.
Any ideas what could be wrong?
Comments
Comment #1
henrijs.seso commentedFound solution and new problem. If date options are not shown to user, default values are set to exact time form is rendered. For fast users decision is closed for 1 minute after creating node :(
Wait. Its a bug. Decision opens 1 minute later, not on time set in node form...
* Current date: 2010, October 28 - 05:00
* Opening date: 2010, October 28 - 05:00
This decision is currently closed.
* Current date: 2010, October 28 - 05:01
* Opening date: 2010, October 28 - 05:00
This decision is currently open.