Not to worry - turns out pQuery was flawed. Using the standard ajax
helper with prototype works fine. I just need to put up with the jerky
animations :-(

On Feb 15, 3:17 pm, Dave Waller <[email protected]> wrote:
> Dear All,
>
> I'm trying to do something that sounds quite simple but I'm really
> struggling. I want to provide a form for users to edit their profile
> from within their main page (/users/index). Profile is a separate
> model that is related to the User model.
>
> I've got the data coming in fine...
>
> $user['Profile']['id'] = 3,
> $user['Profile']['user_id'] = 7,
> $user['Profile']['name'] = 'Dave Waller',
> etc.
>
> ...and I'm able to build my form and populate it with my data (done in
> the file views/users/index.ctp)...
>
> echo $ajax->form(null,'post',array(
>         'update'=>'temp',
>         'url'=>array('controller'=>'profiles','action'=>'edit')
> ));
>         echo $form->input('Profile.id',array('value'=>$user['Profile']
> ['id']));
>         echo $form->input('Profile.user_id',array('value'=>$user['Profile']
> ['user_id']));
>         echo $form->input('Profile.name',    array('value'=>$user['Profile']
> ['name']));
>         echo $form->input('Profile.location',array('value'=>$user['Profile']
> ['location']));
>         echo $form->input('Profile.context',array('value'=>$user['Profile']
> ['context']));
> echo $form->end('Update');
>
> ...but no matter how I set things up I never get the results I want.
> Sometimes the page loads and I get the 'missing view' message,
> sometimes nothing happens, sometimes I get ajax.ctp layout, other
> times I get default.ctp layout. Whatever I do get, I never get an ajax
> form that communicates with my controller :-(
>
> I'm using pQuery rather than the standard ajax helper so I can make
> use of jQuery rather than Prototype and it seems to be embedding ok.
>
> I'm now at the point where I can't quite see clearly so would love
> some help for both my view file and my Profiles controller.
>
> Thanks in advance,
>
> Dave.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to