Reputation: 651
I have encountered an issue on which I haven't found much documentation online. I'm hopeful the SO community will have some advice.
I am currently trying to build a Profile Update page, which doesn't require that all of the fields are to be required. In other words, I'm hoping to set rules with *$this->form_validation->set_rules()* for all fields, but understanding that only a few fields will be populated and sent. The idea being that, if a field has been modified, then it is assumed to be updated.
How can I achieve this?
Edit 1: Trying to allow a user to update their profile. The profile already exists, but they might not submit all fields when updating so the ones that are "required" would reject, no?
No code - I'm asking how to even approach the conundrum. Thanks!
Thanks!
-E
Upvotes: 0
Views: 124
Reputation: 3740
Compare sended values and database values before updating. Do not update if they are all same.
Upvotes: 0