[Seaside] Form Input for One Field
boris at deepcovelabs.com
Thu Aug 16 12:47:05 UTC 2007
Just set #defaultAction: callback on a form that is the same as the one on your submit button.
(Sent from a BlackBerry)
----- Original Message -----
From: seaside-bounces at lists.squeakfoundation.org <seaside-bounces at lists.squeakfoundation.org>
To: Seaside - general discussion <seaside at lists.squeakfoundation.org>
Sent: Thu Aug 16 05:42:07 2007
Subject: [Seaside] Form Input for One Field
I have a strange problem. In the following form, I want the user to enter a
username (email address), press Return, and thereby submit the form. But if
this field is the only one with textInput, pressing Return doesn't seem to
do anything. I need a second field, say, #dummy, in order to enable submit
by pressing Return. (The focus can remain in the first field; the dummy is
Either way, clicking on the submit button works, but I also want the Return
key to do the same thing.
with: [html text: 'your username'].
with: [html textInput on: #emailAddress of: user]].
"The following dummy field is needed to enable carriage return submit."
with: [html textInput on: #dummy of: user]].
with: ' '.
with: [html text: ''].
[(html submitButton class: 'submit'; on: #save of: self) text:
If the dummy field is needed, is there a way to make it hidden or invisible?
Is there a better way to achieve what I'm doing here?
Seaside mailing list
Seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside