Home » Developer & Programmer » Forms » How to submit form when hitting the ENTER key
How to submit form when hitting the ENTER key [message #288697] Tue, 18 December 2007 06:27 Go to next message
amjathkhan.subhankhan
Messages: 9
Registered: December 2007
Location: chennai
Junior Member
Hi,
i designed one custom form with the search button, it has some text fields. When entering some values in text field and hitting the "ENTER" key it goes to the next field in the form.

By oracle standard when hitting the "ENTER" key it submit the form.

How to submit the form when hitting the "ENTER KEY" in my customized form?

Please help me to fix the issue

Thanks,
amjadkhan
Re: How to submit form when hitting the ENTER key [message #288710 is a reply to message #288697] Tue, 18 December 2007 07:04 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, <Enter>'s default action is exactly that: moving to the next item (just like <Tab> does).

What do you call "submitting the form"? Calling another form? If so, try CALL_FORM, OPEN_FORM or NEW_FORM built-ins.
If it means "execute a query", use EXECUTE-QUERY built-in.
If it is something else, what is it, then?
Re: How to submit form when hitting the ENTER key [message #288713 is a reply to message #288710] Tue, 18 December 2007 07:18 Go to previous messageGo to next message
amjathkhan.subhankhan
Messages: 9
Registered: December 2007
Location: chennai
Junior Member

i have one search button in my customized form. When clicking the "SEARCH" button, i call the GO_BLOCK('SEARCH_RESULT_BLOCK') statement in WHEN-BUTTON-PRESSED trigger.

like this when hitting the "ENTER KEY" it will directly go to the "SEARCH_RESULT_BLOCK"

Thanks,
amjadkhan
Re: How to submit form when hitting the ENTER key [message #288728 is a reply to message #288713] Tue, 18 December 2007 07:53 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Just the same! Code you used in the WHEN-BUTTON-PRESSED trigger can be used in the KEY-NEXT-ITEM trigger as well. In other words, you don't want to cycle through all items in this record, you don't even want to go to next record - you want to go somewhere else! So - use GO_BLOCK.

However, perhaps you'd rather want to modify block "Navigation Style" property and change it to "Change Data Block"; this property tells forms how to process "next" or "previous" item when focus is on first or last navigable item. In your case, as I've understood, it is the "last" navigable item and you should modify "previous/next Navigation Data Block" properties too.
Re: How to submit form when hitting the ENTER key [message #288897 is a reply to message #288728] Wed, 19 December 2007 00:41 Go to previous messageGo to next message
amjathkhan.subhankhan
Messages: 9
Registered: December 2007
Location: chennai
Junior Member
I want a trigger to fire on pressing the "Enter" key of keyboard. I have tried "key-enter" but it doesn't work.
i also tried with "KEY-OTHERS", when pressing the "Enter " key this trigger fires but when pressing the tab key also this trigger fires

Please Help.

[Updated on: Wed, 19 December 2007 00:42]

Report message to a moderator

Re: How to submit form when hitting the ENTER key [message #288914 is a reply to message #288897] Wed, 19 December 2007 00:59 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
You're not the first with this question. I refer to Metalink note 209671.1 where it is explained in detail. I cannot disclose Metalink material but I can tell you that have to change the FMRWEB.RES for the Enter key.

And lucky for you, it is in the documentation.

MHE

keyword: FMRWEB.RES, enter key, key-enter trigger

David

[Updated on: Wed, 19 December 2007 19:20] by Moderator

Report message to a moderator

Previous Topic: increase speed of open form
Next Topic: Problem with FORMS 6i
Goto Forum:
  


Current Time: Tue Dec 03 06:22:41 CST 2024