Skip to content

jekor/minform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

minform 2.0 - A Minimalist JavaScript Form Enhancer

Demo at http://www.minjs.com/#minform

Features

  • minimal markup: HTML5 form attributes
  • minimal code: and no library dependencies
  • minimal UI: subtle hints rather than explicit instructions

How to Use

var form = document.getElementById('yourForm');
minform(form);

Features

placeholders

<input placeholder="some text">

You need to style "placeheld" inputs yourself. A good default is:

.placeheld {
  color: #A0A0A0;
  font-style: italic;
}

autofocus

<input autofocus>

Automatically focuses the element when minform() is called on it. Note that only the first autofocus input is focused.

required

<input required>

Will block form submission and focus the required element if it has not been filled in.

Unsupported Browsers

  • Internet Explorer <= 8

About

A Minimalist JavaScript Form Enhancer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published