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 not used.) Either way, clicking on the submit button works, but I also want the Return key to do the same thing. html form: [html div class: 'row'; with: [html span class: 'formlabel'; with: [html text: 'your username']. html span class: 'forminput'; with: [html textInput on: #emailAddress of: user]]. "The following dummy field is needed to enable carriage return submit." html div class: 'row'; with: [html span class: 'formlabel'; with: []. html span class: 'forminput'; with: [html textInput on: #dummy of: user]]. html div class: 'spacer'; with: ' '. html div class: 'row'; with: [html span class: 'formlabel'; with: [html text: '']. html span class: 'forminput'; with: [(html submitButton class: 'submit'; on: #save of: self) text: 'submit']]] 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? Thanks, Richard _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Just set #defaultAction: callback on a form that is the same as the one on your submit button. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |