Re: [racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-08-23 Thread Jay McCarthy
On Wed, Aug 23, 2017 at 8:26 AM, Marc Kaufmann wrote: > Hi again, > > I am now trying to deal with formlets in a more principled fashion and thus > trying to implement, as Philip suggested, to use `send/formlet` and > `embed-formlet`. After a lot of tinkering, I still

Re: [racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-08-23 Thread Marc Kaufmann
Hi again, I am now trying to deal with formlets in a more principled fashion and thus trying to implement, as Philip suggested, to use `send/formlet` and `embed-formlet`. After a lot of tinkering, I still haven't figured out how to actually process the formlet (without having to pass it around)

Re: [racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-03-16 Thread Marc Kaufmann
Thanks Philip. I checked out the links, but I fear that it's over my head, and that I would almost surely screw it up. For now I'll keep passing the parameters. Cheers, Marc On Tuesday, March 14, 2017 at 3:22:39 PM UTC-4, Philip McGrath wrote: > If you want it to be part of the continuation

Re: [racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-03-14 Thread Marc Kaufmann
Thanks for the detailed answer Philip! Some of it is definitely over my head. The reason I don't pass around the id is that I use the html field exactly to track the id and wanted to avoid having to pass around the argument left and right - and the only ways to pass it on are via forms or by

Re: [racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-03-14 Thread Philip McGrath
In this case it will work despite being a hack, because you know that your id argument affects only the display stage, not the processing stage: however, you can't know in general that this will work for dynamically generated formlets, and personally I would therefore be reluctant to rely on this,

[racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-03-14 Thread Marc Kaufmann
Hi, I have created a formlet like so: (define (matrix-formlet id) (formlet (#%# ,{input-string . => . ones} ,{(to-string (required (hidden id))) . => . user-id} ) (values ones user-id))) I display this as follows: `(form ((action