Solved

Form processed when pressing Enter

Posted on 2000-05-05
8
258 Views
Last Modified: 2013-12-18
I have some forms with just one editable field. The form is processed  if you
 hit 'enter.' (form processed).

I need the user press the ok button to submit the form. How avoid to process the form just pressing enter in the editable field? If two or more editable field are defined in the form nothing happens, but I can't show more editable fields and the type=hidden fields don't work.

Thanks.
0
Comment
Question by:perevicente
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:snocross
Comment Utility
Do you have an OK button AND a SUBMIT button?  Is your OK button an action button or a button on the form?
0
 

Author Comment

by:perevicente
Comment Utility
I just have one OK button an it is an action button
0
 
LVL 5

Expert Comment

by:snocross
Comment Utility
When you press enter the browser is looking for the first button on the form.  Since there isn't one (other than the action button) it does a regular old SUBMIT.  If you put your OK button on the form instead of using the action button it should work.
0
 

Author Comment

by:perevicente
Comment Utility
My form is full of buttons (html and action). I'm hidding or showing some fields,data and buttons denpending on the sequence I'm in the workfolw (the form is never saved).

The last step of the action shows a editable field (password field) and two buttons: OK and cancel. The first one is an html button and the other one is anaction button.

The OK one lunck a onclik event.

the form has no onsubmit event.

When I try what you say (I define a button before the OK button) the form is still submited.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 5

Expert Comment

by:snocross
Comment Utility
snocross changed the proposed answer to a comment
0
 
LVL 5

Accepted Solution

by:
snocross earned 30 total points
Comment Utility
Try this:

1. Add a hidden editable field called "Flag" to the form with the following Input Validation Formula:

@If(Flag="";@Failure("You must click the Submit button to save");@Success)

Then change the formula in the Submit button to the following:

Field Flag:="OK";
Field Status:="Saved";
@Command([FileSave]);
@Command([FileCloseWindow])
0
 
LVL 3

Expert Comment

by:Simon_Hendry
Comment Utility
If your using R5 then you can specify the onSubmit Event to be

return Never()


and the JSHeader to be

function Never()
{
alert('You must press the OK button to submit this data');
return false;
}


That way when the form is submitted via a SUBMIT Button or by the user pressing enter in an editable field the form will do nothing... I assume that your OK button is of type BUTTON not of type SUBMIT..

You can do the same in R4 but its a lot more fiddly...

0
 

Author Comment

by:perevicente
Comment Utility
Thanks, I think  I can manage it
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now