Jakob: I am very interested in doing the same thing. Please let me know if you get it working. Mint.com has a really great interface for submitting and confirming forms. Does anyone know of a good tutorial that covers something like this?
On Jan 17, 7:53 am, WebbedIT <[email protected]> wrote: > There is no 'label' parameter with a submit button, this needs to be > changed to 'value'. > > Your 'onclick' parameter also needs a lot of extra information, the > main part being 'return: false;' to stop the form from submitting in > it's usual manner. Because you are submitting a form through ModalBox > you also need to serialize the form data and tell it to use POST > method instead of the default GET. All form data will appear in the > controller as $this->data as normal. > > If you have not already done so I advise you add the RequestHandler > component to /app/app_controller.php as that will automatically switch > ajax calls to use the ajax layout. If you want to run any flash > messages etc. within your ajax view you will need to copy /cake/lib/ > views/layouts/ajax.ctp to /app/views/layouts and add your flash > message echo in there along with any other layout/content changes. > > Updated code: > > <?php echo $form->end ( array( 'value' => 'Granska beställningen', > 'onClick' => "Modalbox.show('/orders/add', {params: Form.serialize > ('NameOfForm'), method: 'post'}); return false;" ) ); ?> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
