How do I submit a form and once submitted show the newly edited data?
Using the standard Cake ajax helper I click "edit" and load the form
into a div with success, I can use the form to edit the data, hit
submit....then nothing. If I refresh the page I can see the edits made
but this is not how it is supposed to work. What I am looking for is
submit -> saving -> load updated view
Just not sure where I put the code to tell cake to load the original
element... in the form or in the controller?
I start of in the layout rendering an element inside the <DIV> which
is what gets replaced by the form, the form is views/users/
update_user.ctp
update_user.ctp
<?php echo $ajax->form('update_users/'.$user['User']
['slug'],'post',array('model'=>'User','update'=>'Users'));?>
<?php //echo $form->create('User', array('action' => 'update_user'));?
>
<fieldset>
<legend><?php __('Update User');?></legend>
<?php
echo $form->hidden('id');
echo $form->hidden('user_id');
echo $form->input('User',array('multiple'=>'checkbox'));
?>
</fieldset>
<?php echo $form->end('Submit');?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---