eatskolnikov / skipemptyfields

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Skip form empty fields submission

What is this?

This is a script that makes it so your Form doesn't submit the empty fields.

Useful for filter forms when you have several fields but want the URL to remain readable.

Usage

  • Include the skipEmptyFieldsSubmission.js script.
  • Call the following function in your code:
    skipEmptyFieldsSubmission("skipFieldsFormClassName");
  • In this call the paremeter skipFieldsFormClassName will be the class name you assigned to your Form.

Important: This parameter is not optional.

Visual aids

images/skipemptyinputs.gif

About


Languages

Language:HTML 50.8%Language:JavaScript 49.2%