Sounds like you are creating a new entry instead of saving the data from the
current one.

Try using $this->Model->saveField('field_name','value');

So in your controller check which field they have field out, and call
saveField for only that field.

On Tue, Dec 8, 2009 at 1:30 PM, Dave <[email protected]> wrote:

>  I am attempting to allow user to edit their url and email, so i load the
> form up and leave it blank since both have to be unique if its filled with
> their original info and edit 1 field the other will fail because it says
> email / or url already exists since they only changed one. So save the form
> and the field they did not edit is now empty in the db. If i try the
> if(empty($this->data['User']['email'])
> {
> $this->data['User']['email']) = $user['User']['email'];
>
> ]
>
> it fails because it says its already used
>
> I tried thinking how to do this and every way i try fails. The form has 2
> fields, url and email. Validation is set so they are not required, allow
> empty since they may only be changing 1 or the other but unique so whatever
> they change it to can not be in the db already and valid url or email for
> the field.
>
> Any ideas?
>
> Thanks
>
> 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]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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