Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How can we submit a form without a submit button using PHP programming language?

user-image
Question ajoutée par Yasmeen Husam , Web Developer , Al Fahid Systems
Date de publication: 2019/01/31
nabeel javed
par nabeel javed , React JS , Pure Magic events and organization

PHP is server side language and the form is submitted via client side via javascript . to make the submit happen catch the event by javacript by giving an id on the form and prevent its default behavior by document.getElementById and e.preventDefault() and get the fields value in the same way and afterwards use fetch api to communicate with the backened

Farrukh Khan Jadoon
par Farrukh Khan Jadoon , Supervisor , A2C Services LLC

yes it is....

When it comes to development, nothing is impossible. And by impossible I really mean impossible, you can do any thing you can imagine.

Your query can be solved with the help of both java script and ajax. all you have to do is use events like blur or change etc. and you can can perform a form submission.

In fact java script have submit functions which can be submit the for to required action.

now perhaps you will be thinking m just telling you the possible ways but why am i not giving you the exact code of name of the function, this is because I want you to search for it. Because in the journey you will learn few more things which will help you in future.

best of luck. Thank you

ZEESHAN undefined
par ZEESHAN undefined , frontend web developer , Uforia Logic

Dont want to add button at all ?

  1. add onkeyup event on last input field
  2. if the key is "Enter" run your code to validate and submit

Nandalal s
par Nandalal s , PHP developer , Aries Estrrado

Using Button Id we can able to submit the form by taking each elements value.

Mohamed Irshad
par Mohamed Irshad , Senior Software Engineer , Zynga

Add javascript code to auto submit the form based on some events like after verifying that the form is completely filled

abdalla matar
par abdalla matar , IT Web administrator , Abu Dhabi Department Of Education And knowledge

BY using javascript and and assign a submit method

sonu agrawal
par sonu agrawal , software testing engineer , primavera systems

using submit() methos in javascript

Dana Kaplan
par Dana Kaplan , Assistant instructor , University Of Kalamoon

it can e done by using Javascript "submit()" function.

By simply including some JavaScript code

Abdelkarim AKKARI Akkari
par Abdelkarim AKKARI Akkari , System Analyst , Flocert GmbH

Via JS using document.getElementById("form_id").submit();

form_id is the form id.

David Spautz
par David Spautz , Backend Developer , Evopark GmbH

I prefer not to use PHP. Use more modern Languages

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?