Confirm When Submit HTML Form Using Inline JavaScript

Sometimes, we need to create a HTML submit form. We need to make sure the conformation before users submit the form. So that, we can use Form onsubmit Event and Inline JavaScript to make it. The onsubmit event occurs when the submit button in a form is clicked.

Confirm When Submit HTML Form Using Inline JavaScript

Single Confirm When Submit

<form name="FORM_NAME" method="post" action="TARGET.php" onsubmit="return confirm('Are you sure?');">

   <input type='submit' value='Submit'>

</form>
Confirm Example:

Double Confirm When Submit HTML Form Using Inline JavaScript

Double Confirm When Submit

<form name="FORM_NAME" method="post" action="TARGET.php" onsubmit="return confirm('Are you sure?') && confirm('Are you really sure?');">

   <input type='submit' value='Submit'>

</form>
Double Confirm Example:

With this method, we able confirm when submit HTML form using Inline JavaScript.

Please do hesitate to contact me if you found out any mistake.

What is WordPress Child Theme? Why We Need Child Theme?

WordPress Child Theme

What is WordPress Child Theme?

A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of the parent theme.

WordPress Child Theme is a WordPress theme that inherits its functionality from another WordPress theme (mostly parent theme). A child theme allows us change the functionality of the theme without edit the original theme template files. With this, we won’t be losing the ability to update the theme.

Why We Need WordPress Child Theme?

Developers like to use child theme to speed up their development. A good parent theme usually contains its own action hooks and filters. This allows developers to create a robust custom WordPress site using child theme in a short time.

Most DIY users create a child theme to tweak an existing theme without losing the ability to update the parent them if needed. They can modify the styles of elements by editing the style.css in child theme.

There are few advantages to use a WordPress Child Theme:

1. Updates
By using a child theme, users can update the parent theme safely because all of the modifications are saved in the child theme.

2. Extend
Users can add new functionality and much more by using a child theme. Users able to tweak a parent theme based on their requirement.

External Link: How to Create a Child Theme

Please do hesitate to contact me if you found out any mistake.