Re: choosing the submit for Enter in a textfield?
Re: choosing the submit for Enter in a textfield?
- Subject: Re: choosing the submit for Enter in a textfield?
- From: OCsite via Webobjects-dev <email@hidden>
- Date: Tue, 28 Mar 2023 15:31:16 +0200
René,
> On 28. 3. 2023, at 14:23, René Bock <email@hidden> wrote:
> I guess the only non JS solution would be to split the form in two different
> forms.
Thanks, but since the layout is
[some form 1 items]
[complete form 2]
[other form 1 items]
I don't think I can do that. Perhaps if I could add the “form” attribute to the
form 2 inputs it might work; but far as I know, with standard WO/nder inputs
and submits that is not possible (or is it?), and although I could write my own
ones, well, it's still easier to use the darned JS :)
Thanks and all the best,
OC
>> Am 26.03.2023 um 23:05 schrieb ocs--- via Webobjects-dev
>> <email@hidden>:
>>
>> 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).
>
_______________________________________________
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