[Haskell-cafe] WASH defaults in inputFields

Jeremy Shaw jeremy.shaw at linspireinc.com
Tue Feb 22 13:53:08 EST 2005

At Tue, 22 Feb 2005 18:26:29 +0100,
Tomasz Zielonka wrote:
> On Tue, Feb 22, 2005 at 04:48:07PM +0000, John Goerzen wrote:
> > Hi,
> > 
> > Hope this is not a stupid question, but I RTFM'd and couldn't find the
> > answer.

> Most functions for creating fields (like textInputField) take a
> parameter with type (WithHTML sth CGI ()). Using this you can
> supply additional attributes to the INPUT tag, or whatever tag
> it is. Now you can simply use ordinary HTML to fill the default
> value. For example, if you use textInputField do this:
>     i <- textInputField (uaVALUE "default value" >> uaSIZE "10")
> or this way if you use CGI, not GuaranteedCGI:
>     i <- textInputField (attr "value" "default value" >> attr "size" "10")

For what john asked, I usually do something like:

      i <- textInputField (fieldVALUE "the default value")

Not sure if there is any advantage/disadvantage to that. 

Jeremy Shaw.

This message contains information which may be confidential and privileged. Unless you are the 
addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone 
the message or any information contained in the message. If you have received the message in error, 
please advise the sender and delete the message.  Thank you.

More information about the Haskell-Cafe mailing list