DEV Community

Falah Al Fitri
Falah Al Fitri

Posted on • Edited on

1 1

jQuery Form multi submit preventDefault()


Happy Coding

https://stackoverflow.com/questions/11609295/jquery-submit-multiple-forms-in-a-page/59317426#59317426

/* get all form and loop */
$( "form" ).each( function () {

    /* addEventListener onsubmit each form */
    $( this ).bind( "submit", function (event) {

        /* return false */
        event.preventDefault();

        var form = event.target;

        /* display each props of forms */
        console.log( form ); // object formHTML
        console.log( "form id: " + form.id );
        console.log( "form action: " + form.action );
        console.log( "form method: " + form.method );

    } );

});
Enter fullscreen mode Exit fullscreen mode

Demo repl.it

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more