Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7678103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:34:06+00:00 2026-05-31T17:34:06+00:00

I have a dynamic form that is to be displayed using an iPad. This

  • 0

I have a dynamic form that is to be displayed using an iPad.

This form has a couple of radio buttons and some text fields and one submit button.

In an iPad the virtual keyboard GO button is supposed to act ad the enter key, causing the first submit button in the form to be clicked and the form to be posted.

To avoid excessive involuntary postings before the form is complete we added an extra submit button higher up in the form, absolutely positioned outside of the visible area with onclick=”return false;”.
This hijacks the enter keystroke preventing accidental posting in every browser except Safari Mobile.

On an iPad we even tested Opera mobile and it works as expected.

But Safari Mobile apparently ignores the return false since event clicking the button causes a post that no other browser does, not even safari on PC.

My questions are

1: Why is safari mobile ignoring “return false” on submit, is there an other mechanism at play here?

2: How can I stop Safari mobile from posting the form when clicking GO?

I have made numerous searches on Google and Stackoverflow and found many examples but all requires a lot of javascript and event binding and the dynamic nature of the form along with user generated content makes this error prone and pretty complex since almost all required binding events to every textbox and textarea.

Any solution that works is good but the simpler the better, especially if it does not require to much customization of the form or events that might conflict with autocomplete or validation events.

Example testpage: http://lab.dnet.nu/ipad.php

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:34:07+00:00Added an answer on May 31, 2026 at 5:34 pm

    I found a solution to my problem.

    The base to the problem is that Safari mobile ignores onsubmit=”return false” on buttons, it only works on forms.

    Setting onsubmit=”return false;” on the form, making a normal button (not submit) and setting onclick=”form.submit()”.

    Ex.

    <form method="post" onsubmit="return false;">
        ... //Other fields here
    
        <input type="button" value="Send" onclick="form.submit();" />
    </form>
    

    The Go button does not trigger a normal button, only submit buttons.
    Since the form has onsubmit="return false;" it will not post.

    The button on the other hand, when clicked triggers the onclick="form.submit();" which overrides the onsubmit on the form.

    This solution seems to work in any browser reliably.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form with a stage that has a dynamic number of groups
I have a dynamic form that can be cloned, using the SheepIt! plugin to
I have a web form that I am attempting to implement dynamic drop down
I have a CRUD form that has a select widget. The options in the
I have a simple Widget that I've created using a ContentPart. The ContentPart has
I have a dynamic form that I've written in rails. I want to be
I have a form that submits parameters using standard HTML controls to a PHP
I have a dialog box that displays a dynamic-sized form. I currently get the
I have a form which changes the inputfields depending on a radio-button. for text
I have... a dynamic populated select box several input boxes a submit button form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.