field value

Im trying to set the value of a field to nothing, but cant get it to work.
$fields['password']['value'] = '';

Comments

  • edited 11:32AM
    Are you trying to edit a value? If so, any value set in the form_fields() method of your model, will be overwritten by any saved data. To get around the issue with the password, I'd suggest one of two ways:

    # Create an "edit_method" (a method on your modules model) that will filter out the value and then change your modules. You then assign the name of the method in you MY_fuel_modules file. More can be found here: http://www.getfuelcms.com/user_guide/modules/simple
    # Create a new field like $fields['new_password'] and unset your $fields['password'] in your form_fields method. Then use a model hook to do any processing with new_password instead of password.
Sign In or Register to comment.