[racket] formlets with radio button & checkbox example?

From: keydana at gmx.de (keydana at gmx.de)
Date: Mon Dec 26 14:02:25 EST 2011


it's me again, and whereas I don't know how dumb I am I sure might have been a bit lazy :-;

Unfortunately, even after taking a bit more time, I don't know how it works. Lastly, I've been trying this, which displayed fine:

(define f-choose-db
  (let ((o (radio #"orcl" #t))
        (r (radio #"rndba" #f)))
     (div "orcl" ,(o . => . orcl)
          "rndba" ,(r . => . rndba))
     (values orcl rndba))))

But when I use formlet-process to extract the result (just clicking submit, leaving the checked box checked), I get the values #<binding:form> and #f... (and see input_0=on in the browser).

Also I was trying to add a binding name to the radio function calls themselves, e.g. (radio #"xx" #f . => . myname), but this throws a syntax error.

Could anyone offer a hint what I'm doing wrong here?

(BTW this list has the most helpful people & inspiring content of all mailing lists I know of , and I'm not writing this in order to get a nice answer :-) )


Posted on the users mailing list.