0
votes

I'm using symfony 1.4 with doctrine, I generated a User module using the admin generator and I want to show the password field as an input of type password for the edit and the create forms. All the solutions I found on the internet refers to symfony 1.1 or 1.2 and the use of the input_tag_password helper that is deprecated in symfony 1.4. Also I tried to use the type property for the field in the generator.yml file of the module with no results.

Any clue to this will be appreciated, thanks in advance.

1

1 Answers

1
votes

Finally I solved it using a partial and editing the generator.yml file:

<div class="password_field">
  <div>
    <label for="password_field">Password</label>
    <div class="content">
      <input type="password" name="password" id="password_field" />     
    </div>
  </div>
</div>

And in generator.yml:

  edit:    
    display: [username, _password, email_address]

I don't know if this is the best way to do it, but it worked for me. If someone has a better answer please share it :)