field value

edited September 2011 in News & Announcements
How can I set a field value?

$fields['password']['value'] = '';
This ain't working!

Thx.

Comments

  • edited 12:52PM
    It's because the values are getting set by Form_builders set_field_values method in the module controller and overwrites the values set in your form_fields method.

    How we get around it in FUEL is to create a new field call 'new_password' and then use model hooks (e.g. on_before_save()) to set it to the password value.
  • edited 12:52PM
    Ok, thanks!
  • edited 12:52PM
    And how about some other field?
    Do I have to overwrite the field with other?
  • edited February 2012
    Could you provide an example of what you are asking to help me visualize? Thanks.
Sign In or Register to comment.