In that case it sounds to me like the problem might be in the
javascript, not on the server-side. It is at least not a general bug
in CakePHP (for example I have several forms submitted over and over
via ajax working fine).
Are you sure that when you go from "index" to "add" in your modal that
it is a GET request? The reason I ask is that since the html page has
not refreshed the old form data may still be accessible to your
javascript so if you each time do - Form.serialize
('TelephonyNumberAddForm') - you may be resubmitting the old data.
Since I haven't used ModalBox I am flying blind... but one other thing
to look at is your form. Looking at the example from your other thread
(http://nerdnotes.org/2008/02/28/combining-modalbox-cakephp/) he uses
$ajax->form() for his forms when they are requested from ModalBox...
which may have some significance.
/Martin
On Jan 14, 3:55 pm, WebbedIT <[email protected]> wrote:
> Arggh ... same problem when using redirect!
>
> 1. Open my modal window which runs 'index' action
>
> 2. Click on 'Add' link which runs 'add' action and displays the form
>
> 3. Fill in and submit the form which runs 'add' action, saves the data
> and redirects to 'index' action
>
> 4. Click on 'Add' link which runs 'add' action but $this->data is
> populated with step 3's data so adds this data again and redirects to
> 'index'
>
> I shall go and start annoying my neighbours by banding my head against
> this wall again!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---