Add new date link (Add+): Pre-populate date field in new node

bernadotte - March 13, 2009 - 16:58
Project:Date
Version:6.x-2.2
Component:Date CCK Field
Category:feature request
Priority:normal
Assigned:Cainan
Status:needs review
Description

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

KarenS - March 17, 2009 - 18:43
Status:active» fixed

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

bernadotte - March 20, 2009 - 19:01

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

System Message - April 3, 2009 - 19:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#4

Cainan - May 16, 2009 - 23:19
Version:6.x-2.x-dev» 6.x-2.2
Assigned to:Anonymous» Cainan
Status:closed» needs review

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

AttachmentSize
date_destination.patch 2.34 KB

#5

KarenS - May 17, 2009 - 11:51
Title:Add new date link (Add+): Not pre-populating date field in new node» Add new date link (Add+): Pre-populate date field in new node
Category:support request» feature request
Status:needs review» needs work

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

Cainan - May 22, 2009 - 14:54

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

Cainan - November 6, 2009 - 04:19
Status:needs work» needs review

changing status.

 
 

Drupal is a registered trademark of Dries Buytaert.