Hi Alex I can't remember if we had this discussion on IRC or on the
list. I'll do a short recap in case it was IRC.

The main thing is that my old registration form looked like this:

(de register ()
   (app)
   (action
      (rss-html
         (form NIL
            (unless *Post (=: obj (new! '(+User))))
            (<table> NIL NIL NIL
               (<row> NIL "Username"  (gui '(+E/R +AlNum) '(uname :
home obj) 10))
               (<row> NIL "Password"
                  (gui
                     '(+E/R +PwdCheck +PwField)
                     '(pwd : home obj)
                     '(val> (: home pwd2)) 10))
               (<row> NIL "Password Again" (gui 'pwd2 '(+PwField) 10 ))
               (<row> NIL "Email" (gui '(+E/R +TextField) '(email :
home obj) 10))
               (<row> NIL "Twitter username" (gui '(+E/R +TextField)
'(tw_uname : home obj) 10))
               (<row> NIL "Twitter password" (gui '(+E/R +PwField)
'(tw_pwd : home obj) 10))
               (<row> NIL (gui '(+Button) "Save"
                             '(let Usr (: home obj)
                                 (cookie 'uid (put!> Usr 'uid
(randNum> '+Gh 20)))
                                 (redir)))))))))

As of PicoLisp 3 *Post for instance is no more so the above wouldn't
work, the result was a reworked proposal for the form by Alex which I
subsequently filled in the gaps in (ie cookie, redirect etc). The
result is here:

(de register ()
   (app)
   (action
      (rss-html
         (form NIL
            (<grid> 2
               "Username" (gui 'uname '(+E/R +AlNum) '(uname : home obj) 10)
               "Password"
               (gui 'pwd '(+E/R +PwdCheck +PwField)
                  '(pwd : home obj)
                  '(val> (: home pwd2)) 10)
               "Password Again" (gui 'pwd2 '(+PwField) 10 )
               "Email" (gui 'email '(+E/R +TextField) '(email : home obj) 10)
               "Twitter username" (gui 'twn '(+E/R +TextField)
'(tw_uname : home obj) 10)
               "Twitter password" (gui 'twp '(+E/R +PwField) '(tw_pwd
: home obj) 10) )
            (gui '(+Button) "Save"
               '(cond
                   ((db 'uname '+User (val> (: home uname)))
                      (err "Name not unique") )
                   ((<> (val> (: home pwd)) (val> (: home pwd2)))
                      (err "Password mismatch") )
                   (T
                      (let Usr
                         (new! '(+User)
                            'uname (val> (: home uname))
                            'tw_pwd (val> (: home tw_pwd))
                            'tw_uname (val> (: home tw_uname))
                            'pwd (val> (: home pwd))
                            'email (val> (: home email)))
                         (cookie 'uid (put!> Usr 'uid (randNum> '+Gh 20)))
                         (redir)))))))))

The problem with this form is that only the pwd2 field is able to
receive any kind of attention, the others are completely shut down,
I'm unable to get the cursor to appear in them. The only lead I have
on this one is that the pwd2 field is of course the only field that is
not a part of the +User E/R.

I'm using FF 3.5.3, any ideas what the problem might be?

/Henrik
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to