We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to submit a form without a submit button in php?

Thread ID:





150887 Jan 23,2020 07:38 AM UTC Jan 27,2020 02:14 PM UTC General Discussion 3
Tags: General Discussion
Harsh Shah
Asked On January 23, 2020 07:38 AM UTC

I am just create a form using php and i want to submit a form but without using submit button.Instead i want to use label.How can i do that?

Ishan Shah
Replied On January 24, 2020 01:47 PM UTC

As you suggest, We Can Submit a form without the submit button using " Div block in Html web form page ". 

The Code is the following : 

<!DOCTYPE html>
<html lang="en">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Submit Without Submit Button</title>
        function submitForm() {
            alert("You Form Is Submitted Successfully");

    form method="post" action="formController.php" id="subForm">
    <input type="text" name="txtName" placeholder="Enter Your Name" /><br />
    <input type="text" name="txtEmail" placeholder="Enter Your Email" /><br />
    <input type="text" name="txtMobile" placeholder="Enter Your Mobile" /><br />
    <textarea name="areaReply" placeholder="Enter Your Address"></textarea>
    <div onclick="submitForm()" style="color:green;">Submit</div>


Replied On January 26, 2020 09:28 PM UTC

Did it work? As I can't resolve the problem with this help.

Davis Jebaraj [Syncfusion]
Replied On January 27, 2020 02:14 PM UTC

Hi Isabell,

Please check this discussion on Stack Overflow for some ways to resolve potential issues with this code.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon