On Feb 22, 4:44 pm, Saikat Chakrabarti <[email protected]> wrote:
> I am trying to create a user registration form that has a "Retype
> Password" field in the view (which does not map to the model's slot).
>
> [snip]
>
> So my question is - is what I am trying to do even possible?
> How should I handle a virtual view field when trying to create a new
> user?

I think my approach would be to write a custom presentation for a
password repeat.  If you look in the weblocks sources, you'll see the
password presentation at

~/src/views/types/password.lisp

You could render both input fields, use javascript to check that they
match, and allow it to map to the single slot of the underlying
object.  I have in mind that you'd have something like this as a view:

(defview login-view (:type form :inherit-from '(:scaffold login-
widget))
  (password :present-as confirmed-password))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to