ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Yasmeen Husam , Web Developer , Al Fahid Systems
تاريخ النشر: 2019/01/31
nabeel javed
من قبل 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
من قبل 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
من قبل 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
من قبل Nandalal s , PHP developer , Aries Estrrado

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

Mohamed Irshad
من قبل 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
من قبل abdalla matar , IT Web administrator , Abu Dhabi Department Of Education And knowledge

BY using javascript and and assign a submit method

sonu agrawal
من قبل sonu agrawal , software testing engineer , primavera systems

using submit() methos in javascript

Dana Kaplan
من قبل Dana Kaplan , Assistant instructor , University Of Kalamoon

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

Abdelkarim AKKARI Akkari
من قبل Abdelkarim AKKARI Akkari , System Analyst , Flocert GmbH

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

form_id is the form id.

David Spautz
من قبل David Spautz , Backend Developer , Evopark GmbH

I prefer not to use PHP. Use more modern Languages

المزيد من الأسئلة المماثلة