Okay Alexander,
I think I get it better now,
How about this:
function extend($id)
{
//Note: The musicianRequest model is automatically loaded for us at
$this->MusicianRequest.
// Check to see if we have get data...
if (empty($id))
{
$this->redirect('MusicianRequest/index'); //
Thanks for your reply.
The action is simple. In my index action, there is a list of all
Musician Requests. After every Request, there is a link, which
executes my extend action with the given ID.
The Extend Action shoul only take 'lifetime' and adding 4 weeks to
it. Th rest of the data is
Alexander, ... I don't see all your code, so I'm guessing.
I assume this is all happening in the save action in your contoller.
And I'm guessing at a few names, but I think you'll get it...
Why not do this (from the docs, but adapted to your question... I
think):
function edit($id)
{
//Note
Hi,
i'm trying to save a single datefield. My Controller looks like this:
-%<
// Set ID and lifetime
$this->MusicianRequest->id = $id;
$lifetime = trim(date( "Y-m-d H:i:s", strtotime( "+4 weeks",
strtotime($this->data['MusicianRequest']['l