• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
choosing the submit for Enter in a textfield?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

choosing the submit for Enter in a textfield?


  • Subject: choosing the submit for Enter in a textfield?
  • From: ocs--- via Webobjects-dev <email@hidden>
  • Date: Sun, 26 Mar 2023 23:05:58 +0200

Hi there,

I've got a form (combined from more separate components) whose overall layout is

<wo:form><!-- ERXWOForm.multipleSubmitDefault=true -->
  ... lots of inputs incl. a number of textfields ...
  <!-- [1] -->
  <wo:textfield value="$bar"/>
  <wo:submit action="$barAction"/>
  ... other inputs and textfields ...
  <wo:submit action="$fooAction"/>
</wo>

I would need that an Enter in the "bar" textfield triggers "barAction"; an
Enter in any other textfield triggers "fooAction".

Can this be done in a clean, preferably non-JS way?

I've found that I can put an invisible submit/fooAction at the place of [1], in
which case _all_ Enters in _all_ textfields trigger "fooAction", but I haven't
been able to find any nice way to ensure an Enter in the "bar" textfield
triggers "barAction". With JS, I can do that, but it is really darn ugly (and
besides it wouldn't work if the user switches off JS for security).

Thanks a lot!
OC

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: choosing the submit for Enter in a textfield?
      • From: RenĂ© Bock via Webobjects-dev <email@hidden>
  • Prev by Date: Swagger automatic generate
  • Next by Date: Re: choosing the submit for Enter in a textfield?
  • Previous by thread: Swagger automatic generate
  • Next by thread: Re: choosing the submit for Enter in a textfield?
  • Index(es):
    • Date
    • Thread