<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Re: [Seaside] Form Input for One Field</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Just set #defaultAction: callback on a form that is the same as the one on your submit button.<BR>
<BR>
Cheers!<BR>
<BR>
-Boris<BR>
(Sent from a BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org &lt;seaside-bounces@lists.squeakfoundation.org&gt;<BR>
To: Seaside - general discussion &lt;seaside@lists.squeakfoundation.org&gt;<BR>
Sent: Thu Aug 16 05:42:07 2007<BR>
Subject: [Seaside] Form Input for One Field<BR>
<BR>
I have a strange problem. In the following form, I want the user to enter a<BR>
username (email address), press Return, and thereby submit the form. But if<BR>
this field is the only one with textInput, pressing Return doesn't seem to<BR>
do anything. I need a second field, say, #dummy, in order to enable submit<BR>
by pressing Return. (The focus can remain in the first field; the dummy is<BR>
not used.)<BR>
<BR>
Either way, clicking on the submit button works, but I also want the Return<BR>
key to do the same thing.<BR>
<BR>
&nbsp;html form:<BR>
&nbsp; [html div<BR>
&nbsp;&nbsp; class: 'row';<BR>
&nbsp;&nbsp; with:<BR>
&nbsp;&nbsp;&nbsp; [html span<BR>
&nbsp;&nbsp;&nbsp;&nbsp; class: 'formlabel';<BR>
&nbsp;&nbsp;&nbsp;&nbsp; with: [html text: 'your username'].<BR>
&nbsp;&nbsp;&nbsp; html span<BR>
&nbsp;&nbsp;&nbsp;&nbsp; class: 'forminput';<BR>
&nbsp;&nbsp;&nbsp;&nbsp; with: [html textInput on: #emailAddress of: user]].<BR>
<BR>
&quot;The following dummy field is needed to enable carriage return submit.&quot;<BR>
&nbsp; html div<BR>
&nbsp;&nbsp; class: 'row';<BR>
&nbsp;&nbsp; with:<BR>
&nbsp;&nbsp;&nbsp; [html span<BR>
&nbsp;&nbsp;&nbsp;&nbsp; class: 'formlabel';<BR>
&nbsp;&nbsp;&nbsp;&nbsp; with: [].<BR>
&nbsp;&nbsp;&nbsp; html span<BR>
&nbsp;&nbsp;&nbsp;&nbsp; class: 'forminput';<BR>
&nbsp;&nbsp;&nbsp;&nbsp; with: [html textInput on: #dummy of: user]].<BR>
<BR>
&nbsp; html div<BR>
&nbsp;&nbsp; class: 'spacer';<BR>
&nbsp;&nbsp; with: ' '.<BR>
<BR>
&nbsp; html div<BR>
&nbsp;&nbsp; class: 'row';<BR>
&nbsp;&nbsp; with:<BR>
&nbsp;&nbsp;&nbsp; [html span<BR>
&nbsp;&nbsp;&nbsp;&nbsp; class: 'formlabel';<BR>
&nbsp;&nbsp;&nbsp;&nbsp; with: [html text: ''].<BR>
&nbsp;&nbsp;&nbsp; html span<BR>
&nbsp;&nbsp;&nbsp;&nbsp; class: 'forminput';<BR>
&nbsp;&nbsp;&nbsp;&nbsp; with:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [(html submitButton class: 'submit'; on: #save of: self) text:<BR>
'submit']]]<BR>
<BR>
<BR>
If the dummy field is needed, is there a way to make it hidden or invisible?<BR>
Is there a better way to achieve what I'm doing here?<BR>
<BR>
Thanks,<BR>
Richard<BR>
<BR>
_______________________________________________<BR>
Seaside mailing list<BR>
Seaside@lists.squeakfoundation.org<BR>
<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
</FONT>
</P>

</BODY>
</HTML>