Add new date link (Add+): Pre-populate date field in new node
| Project: | Date |
| Version: | 6.x-2.2 |
| Component: | Date CCK Field |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Cainan |
| Status: | needs review |
I´m not sure if this issue belongs to calendar or date or both or...
The "Add+" in the calendar view opens a new date form as supposed.
But as the link from which the "Add+" link was hit is containing the date itself (.../node/add/termin?destination=calendar-datum/2009-03-13) i expected it to prepopulate the datefield in the new node, which it doesn´t do.
It´s rather todays date, and when i change it in the datefield setting to empty, its simply emtpy.
So,
1. am i right, that it´s supposed to prepopulate the news nodes datefield?
2. might it be that it doesn´t work, cause i changed date settings to my german timeformats?
3. can i and how can i tweak things, so my new datefields get prepoulted with the date it was triggered from?
I generated everything through the date wizard in two different setups, and in both it doesn´t work as expected.
Cheers
bernd

#1
It is not intended to prepopulate anything, just to bring up an edit form. The code you see is to return you back to the calendar page you started on. There is already a request somewhere to automatically set a specific date, but that is not implemented.
#2
thanx for your answer.
i think it would make sense when there already exists that link for creating a date on a day view, that this would be handed over to save some extra work. (little usability improvement), but actually i can live without it so far.
thanx for those great modules!
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
Ran into this myself. a lot of the users on my site expect the Add+ link to set the form to teh date they clicked to get to it.
The following patch adds a date format of 'destination' which uses the drupal_get_destination() or defaults to 'now'
This patch is against 6.2x-2.2
#5
This is an interesting idea, but if the field has been set up to default to 'now' or to 'blank', this will override that default value. I'm not sure whether or not that's desirable behavior. We may want to make this configurable somehow. I'll let others chime in on this idea and test it.
#6
You'll notice my patch adds a new field setting called 'Destination String'. To get this behavior, the user has to choose it.
That way, its completely a user tradeoff if they want this behavior
#7
changing status.