How to specify the URL that will process the data supplied through input(s) when the form is submitted?
The HTML <input> formaction attribute is used to specify the URL of the file which will process the input control when the form is submitted. After submission of the form, the formaction attribute is called. The form data is to be sent to the server after the submission of form. It overrides the action attribute of the <form> element.
<input type = "submit" formaction = "URL">
The possible value of URL are as follows.
- Absolute URL: It contains the full address of the page. For example “https://www.geeksforgeeks.org/c-plus-plus/”
- Relative URL: It points to a file within the current webpage. For example “gfg.php”
Example : The following example defines to specify the URL which will process the data supplied when the form is submitted.
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.