• Resolved omusman

    (@omusman)


    I want a button above Go to top button, where i found this: GP-Forms

    But as my button is a form input it shows while the users didn’t scroll download which I think is because of this tag <button></button>

    and here’s where I want to submit a form without a button.

    Trying to achieve:

    Article: https://stackoverflow.com/questions/7704976/submit-a-html-form-without-having-a-submit-button

    <scirpt>document.getElementById("myForm").submit();</scirpt>

    <form action="google.com" method="post" target="_blank">
    <div id="myForm">Google</div>
    </form>

    Used GP-Elements to execute the code but throwing this error:

    Cannot read property 'submit' of null

    • This topic was modified 4 years, 10 months ago by omusman.
    • This topic was modified 4 years, 10 months ago by omusman.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Tom

    (@edge22)

    Hi there,

    Cannot read property 'submit' of null

    That error means there isn’t an element on the page with myForm as the ID. Can you confirm that it exists?

    Thread Starter omusman

    (@omusman)

    Was adding id=”myForm” on div tag rather than form elemet:

    Wrong:

    <form action="google.com" method="post" target="_blank">
    <div id="myForm">Google</div>
    </form>

    Right:

    <form id="myForm" action="google.com" method="post" target="_blank">
    <div>Google</div>
    </form>

    Thank You Tom ??

    Theme Author Tom

    (@edge22)

    Glad you got it working ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Form without submit button’ is closed to new replies.