Thanks a lot you guys!
I tried setting up a hidden field "redirect" before ($form-
>hidden....), but got a blank screen when trying to submit the form. I
guess the model didn't validate or didn't know what to do with
data[Event][redirect] since my DB-Event table doesn't have a column
"redirect". So I set the hidden field up manually and in the
controller grabbed the "required" variable from the params
array....and that worked :-)

But grigri's solution looks a lot more elegant, so I guess I'll give
that a try:-)


On 15 Feb., 13:01, grigri <[EMAIL PROTECTED]> wrote:
> I'm not 100% sure this will work, but here goes anyway:
>
> http://bin.cakephp.org/view/818943714
>
> The really annoying bit about this is that you have to process display
> text (the submit image caption/value) as data. In theory, of course,
> you could use a <button> element and set its value property, but IE
> ignores the value property and sends the innerText instead. Typical.
>
> Hope this helps
>
> On Feb 15, 11:27 am, Sebastian <[EMAIL PROTECTED]> wrote:
>
> > Hi y'all,
>
> > I got a problem. I have a form that contains all kinds of data for a
> > Model "Event". That Event has multiple HABTM relationships with models
> > like "Promoters" or "Bands", which are displayed as select fields in
> > the form.
> > Now in order to give the user the opportunity to e.g. add a "Band"
> > that is not yet in the select field, I want to place a link "Add Band"
> > beneath the "Bands" listing that submits the form and then temporarily
> > redirects the user to the Add-View of the  bands_controller. Once he/
> > she has added the new Band there, he/she shall be redirected to the
> > initial "Event"-Edit view.
> > I managed to create links that pass the Event's id as a parameter to
> > the Band's add function so that I can redirect back to the Edit-Event
> > page, after the user has added the Band.
> > However, what I want is to submit the form, before I redirect off to
> > the Band's input form.
>
> > So the question is now: How can I submit a form and pass a redirect-
> > variable to the controller's edit-function so that I can redirect
> > individually?
>
> > Regards,
>
> > Sebastian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to