Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One way would be to remove all of the submit buttons and use input buttons to submit the form programatically. This would remove the ability to submit the form by hitting the enter key in a textbox. You could also leave one submit button as the default submit functionality, and use regular button inputs for the others and submit the form programatically.</p> <p>The obvious short-fall of this is that the users would require JavaScript to be enabled. If this isn't a problem this is a consideration for you.</p> <p><strong>EDIT:</strong></p> <p>Here, I tried to make an example for you using jQuery (the same functionality can easily be created without jQuery)... let me know if this helps...</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Untitled&lt;/title&gt; &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt;&lt;!-- $(document).ready(function(){ $("#f input").filter(":text").keydown( function(event) { if (event.keyCode==13) { $(this).nextAll().eq(0).click(); } }); }); //--&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form name="f" id="f"&gt; &lt;input type="text" id="t1" name="t1" /&gt;&lt;input type="button" id="b1" name="b1" value="button-one" onclick="alert('clicked enter on textbox 1');" /&gt;&lt;br /&gt; &lt;input type="text" id="t2" name="t2" /&gt;&lt;input type="button" id="b2" name="b2" value="button-two" onclick="alert('clicked enter on textbox 2');" /&gt;&lt;br /&gt; &lt;input type="text" id="t3" name="t3" /&gt;&lt;input type="button" id="b3" name="b3" value="button-three" onclick="alert('clicked enter on textbox 3');" /&gt;&lt;br /&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload