On Tuesday, April 12, 2011 9:59:00 AM UTC-4, Bob wrote: 
>
> 2. In similar situation using SQLFORM. When updating the user it's 
> logical to leave the password blank in case you don't want to change 
> it. But SQLFORM crypts the blank and changes the password in the DB

 
If you pass the record id to SQLFORM via the 'record' argument, you'll get 
an update form with the password field pre-populated, so it won't get 
replaced with a blank. Or you can completely prevent the password field from 
being displayed by temporarily setting its 'readable' and 'writable' 
attributes to False. You could also initially hide the (pre-populated) 
password field in the view, and then use javascript to show the field if the 
user decides to change the password.
 
Anthony

Reply via email to