Welcome To Snipplr


Everyone's Recent jQuery Snippets Tagged form



« Prev 1 2
Here’s a super handy snippet that I use very often. It works very simply: once the user clicks on #submit, the data from #form is serialized and sent to a remote page using the POST method.
0 4149 posted 8 years ago by catswhocode
Méthode n'autorisant que les nombres (positifs/négatifs/décimaux avec virgules ou points) dans un champ
0 3027 posted 11 years ago by Igeco
N'autorise que les chiffres (avec , ou . ou négatifs) dans un input
0 2910 posted 11 years ago by sebabarre
This code shows how we post HTML form by AJAX and jQuery.
0 2179 posted 13 years ago by khaled__mahmoud
If someone put text into an input field (or automatic e.g. with a 2d barcode scanner) and you want to replace a part of the input (pattern) then will help this small jquery code snippet.
0 2246 posted 13 years ago by bassdas
Dynamically add <label> HTML tag to input description, matching the input by adding an ID value to the input.
0 1581 posted 14 years ago by jbernus
0 1445 posted 14 years ago by vigoncas
This is a jQuery custom function used for clearing the default input values of input fields without having to add a class or inline javascript like onclick or onblur. Just write your input and give it a value like you normally would and then add this...
1 1893 posted 14 years ago by thursday0384
Specifiy a default value to input text field. OnFocus, the default value clear and let you type a new value. If typed value is erased then the default value is set back.
2 2072 posted 14 years ago by cdurocher
This should enable you to clear elements such as search boxes effectively whilst maintaining usability. Enjoy!
0 1554 posted 14 years ago by Fitzgenius
0 1469 posted 15 years ago by thegrevster
No need to create a seperate function for this one. Just one line to clear the default value on click and leave the value when it has been altered.
1 1608 posted 15 years ago by dyteq
If your HTML form fields have a 'watermark' default value, it will be removed when the field is focussed and replaced if focus is lost (and the user has left the field blank). To use give your form field a class of 'default-value'
3 2178 posted 15 years ago by f6design
See also the [plain JavaScript version](http://snipplr.com/view/41717/default-value-for-input-fields/).
1 1807 posted 15 years ago by riddla
0 1419 posted 15 years ago by touffies
This is some very basic jQuery to post from a comment form on a website. I would probably change the .click to .bind("click",) and for different sites I add a success message. This code works with a basic form with text inputs named #name and #email...
3 1762 posted 15 years ago by creativeboulder
Custom dropdown field, replace defaut dropdown style with custom design. This function does not replace the select field.
1 2650 posted 15 years ago by touffies
Custom Radio box, replace with images
2 1658 posted 15 years ago by touffies
Custom checkbox field, replace by images
2 1810 posted 15 years ago by touffies
2 1646 posted 15 years ago by spraitas
usage; $.toJSON($(\'form\').serializeObject());
3 1911 posted 15 years ago by virgil
« Prev 1 2