Solved

Form processed when pressing Enter

Posted on 2000-05-05
8
259 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
ID: 2780805
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
ID: 2780912
I just have one OK button an it is an action button
0
 
LVL 5

Expert Comment

by:snocross
ID: 2781018
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
ID: 2781244
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Expert Comment

by:snocross
ID: 2781356
snocross changed the proposed answer to a comment
0
 
LVL 5

Accepted Solution

by:
snocross earned 30 total points
ID: 2781377
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
ID: 2786695
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
ID: 2963618
Thanks, I think  I can manage it
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

28 Experts available now in Live!

Get 1:1 Help Now