Solution to Disable a WordPress Form Page if Javascript is Disabled

Problem : WordPress / Visual Form Builder will allow to submit blank forms without validation if Javascript is disabled.

Solution :

STEP1 :

Create a sorry page with a message .

******************************

Sorry

Dear User,

Since Javascript is not enabled in your machine you will not be able to Submit your application.

Please enable Javascript in your browser and try visiting the page again.

*********************************

Publish the page and note the URL for The Page.

for example : haneefputtur.com/sorry/

STEP2:

Find the page id of the wordpress page which have the submission form

Capture

Just take the mouse over the edit link of the specific page to see the Post ID

Step 3 :

Capture2

Capture3

Insert the below code to header.php of the theme. Just in the section of Meta Tags.

<?php if(is_page(42)) {?>
<noscript>
<meta http-equiv=”refresh” content=”0;url=http://www.haneefputtur.com/sorry/”>
</noscript>
<?php }?>

Make sure to replace the correct page ID.

Now Save the file and try again.

.