Making end date 'optional' and validation of input
ekes - June 12, 2006 - 18:30
| Project: | Event |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | ekes |
| Status: | duplicate |
Description
Presently the default 'now' values are a hinderance - and lead to incorrectly filled forms.
Events can have just a start (by having the same end time) but this isn't clear.
There seems to be little user input validation.
Proposed solution:
Make 'end' clearly optional. Say so and have it blank by default.
Add validation checks, that can also handle blank end dates.
Notes:
Validation is ruthless, it maybe worth changing some to 'use default value' and drupal_set_message. Rather than form_set_error? If so which ones, when?
Added an id tag to make it possible for future js to enable optional auto-filling of end time form start
| Attachment | Size |
|---|---|
| event.20060612.patch.txt | 9.93 KB |

#1
#2
This sounds like a useful feature. But I think that this patch doesn't apply to the last event module. I run the patch and two trunks failed. These are the results of the patching process:
patching file event.moduleHunk #1 succeeded at 1073 (offset -8 lines).
Hunk #2 succeeded at 1310 (offset -8 lines).
Hunk #3 FAILED at 1418.
Hunk #4 succeeded at 1452 (offset -8 lines).
Hunk #5 succeeded at 1522 (offset 6 lines).
Hunk #6 succeeded at 1873 (offset 6 lines).
Hunk #7 FAILED at 1885.
Hunk #8 succeeded at 1985 (offset 43 lines).
Hunk #9 succeeded at 2009 (offset 43 lines).
2 out of 9 hunks FAILED -- saving rejects to file event.module.rej
Anyone knows how to update this patch?
Any plan to include this feature in core?
Thanks for this great module.
#3
I manually patched the event.module and build a patch file for it.
#4
This seems like a really useful patch - is there any chance of it being committed?
#5
I think a imple text below the form which explains how it works would be better.
#6
The above patch doesn't seem to apply to 5.1 version.
Is there a way to solve this issue :
- make end date optional
- validate start date and end date (eg: start date >= today, end date >= start date, etc.)
I understand we can use the Forms API. If that is the solution, could someone give an example of the code to use to perform date format checks (since I am not a php programmer at all!).
Your help is appreciated!
#7
See http://drupal.org/node/147558 to co-ordinate discussion of UI change.
Michelle