[html-formfu] Password fields that do not update unless filled in

Ben Sommer ben at bensommer.com
Mon Nov 17 01:03:41 GMT 2008


Steve - if you just remove the email field form the formfu config, it won't
show up in the edit form and your controller won't attempt to update it. As
far as allowing user to elect changing the password, I would define a second
form for just the password field. It would be nice to dynamically
conceal/reveal the password field with some ajax, but I have no code to
share for that one.

On Sun, Nov 16, 2008 at 5:23 PM, Steve <nostrasteve at gmail.com> wrote:

> Hi,
>
> I've got a form editing a user's username, email and password. As usual
> the password fields are blank, and I don't want to update the password
> field in the database unless the user indicates they want to change it
> by filling it in.
>
> Anyway, I can't figure out how to do this.
>
> Relevant bit of application is pretty much part 9 of the Catalyst
> tutorial. Here's the form config:
>
> ---
> indicator: submit
> elements:
>    - type: Text
>      name: username
>      label: Username
>      constraints:
>        - Required
>    - type: Text
>      name: email
>      label: Email
>      constraints:
>        - Required
>    - type: Password
>      name: password
>      label: Password
>      constraints:
>        - type: Equal
>          others: repeat_password
>    - type: Password
>      name: repeat_password
>      label: Repeat Password
>    - type: Submit
>      name: submit
>      value: Submit
>
> Cheers,
> Steve.
>
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20081116/2e=
5c00ee/attachment.htm


More information about the HTML-FormFu mailing list