<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/jquery/tags/forms</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 20 Jun 2013 01:26:01 GMT</pubDate>
<item>
<title>(jQuery) Adding input values and clearing on focus - hubbske</title>
<link>http://snipplr.com/view/63188/adding-input-values-and-clearing-on-focus/</link>
<description><![CDATA[ <p>Adding input values and clearing on focus</p> ]]></description>
<pubDate>Thu, 09 Feb 2012 09:21:41 GMT</pubDate>
<guid>http://snipplr.com/view/63188/adding-input-values-and-clearing-on-focus/</guid>
</item>
<item>
<title>(jQuery) Action a link/submit when input is hit with enter button - hubbske</title>
<link>http://snipplr.com/view/63187/action-a-linksubmit-when-input-is-hit-with-enter-button/</link>
<description><![CDATA[ <p>Action a link/submit when input is hit with enter button</p> ]]></description>
<pubDate>Thu, 09 Feb 2012 09:20:24 GMT</pubDate>
<guid>http://snipplr.com/view/63187/action-a-linksubmit-when-input-is-hit-with-enter-button/</guid>
</item>
<item>
<title>(jQuery) jNice pulldown example - ryarwood</title>
<link>http://snipplr.com/view/55063/jnice-pulldown-example/</link>
<description><![CDATA[ <p>jNice from http://plugins.jquery.com/project/jNice</p> ]]></description>
<pubDate>Thu, 09 Jun 2011 05:40:11 GMT</pubDate>
<guid>http://snipplr.com/view/55063/jnice-pulldown-example/</guid>
</item>
<item>
<title>(jQuery) form onChange change div - soup</title>
<link>http://snipplr.com/view/54495/form-onchange-change-div/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 27 May 2011 19:12:50 GMT</pubDate>
<guid>http://snipplr.com/view/54495/form-onchange-change-div/</guid>
</item>
<item>
<title>(jQuery) Inline labels with jQuery animations - FatFolderDesigner</title>
<link>http://snipplr.com/view/53928/inline-labels-with-jquery-animations/</link>
<description><![CDATA[ <p>After being tasked with creating inputs like those on the twitter homepage I came up with this inline label system that uses jquery to control the labels (in the vase of the example it fase and slides them).

The code is in three parts. First, the input are formatted a very special way, don’t worry it’s basic and easy to implement. Take a look at the first section below. The input is obvious, as is the label, the last div, with the class .inputerror.firstname is some specific code for inline displayed error messages, I may make a post about them if there is any interest. The label is moved over the input box. Because of this it’s important to have the label properly formatted with the for="" element pointing to the appropriate input field.

Second is the CSS. Obviously the code below has some styling for looks, which is fully changeable based on your individual implementation, the important stuff is the display, overflow, and the margin-top on the .inputbox label, as well as the previously mentioned background in the .inputbox input style. You’ll notice that the inputbox doesnt have a width or a height (except where limited by the actual input inside it). That because thats all set via the individual inputs so you can vary it from input to input depending on what will go in it (just like the example has set up).

The last bit of code is the scripting. The first bit checks if there is a value to the input, if not it will reanimate the label back in, with a simple fade in in this case, but you do have full control over how it does it. Then, if there is something in the input it will fade it out, in this case by pushing it right while fading out. Once a label is completely faded out it is hidden so it won’t interfere with normal operation of the input box (like selecting or double clicking). It also makes it visible again before fading it back in.


All three parts put together make a nice animated inline label like the ones on the example page located after the url (scroll to the bottom of the post for a direct link). It’s been tested in IE and on mobile devices and seems to work fine albeit with slow or no animations on mobile devices. 

If you’ve found a great use for this, converted it to another library (or no a library independent form), or have an questions or would like some help with modifications or implementation on your specific site leave a comment below or on the blog at the link.</p> ]]></description>
<pubDate>Sun, 22 May 2011 05:12:00 GMT</pubDate>
<guid>http://snipplr.com/view/53928/inline-labels-with-jquery-animations/</guid>
</item>
<item>
<title>(jQuery) Clear all default field values for inputs - accelm</title>
<link>http://snipplr.com/view/50324/clear-all-default-field-values-for-inputs/</link>
<description><![CDATA[ <p>If included in a global javascript, whenever an input receives focus it will clear the default value. If the element loses focus without any user input then it will put the default value back in there. Useful for when you aren't using &amp;lt;label&amp;gt; and putting the label in the value of the text field instead.</p> ]]></description>
<pubDate>Wed, 09 Mar 2011 01:59:04 GMT</pubDate>
<guid>http://snipplr.com/view/50324/clear-all-default-field-values-for-inputs/</guid>
</item>
<item>
<title>(jQuery) Default value for input fields (jQuery version) - riddla</title>
<link>http://snipplr.com/view/48275/default-value-for-input-fields-jquery-version/</link>
<description><![CDATA[ <p>See also the [plain JavaScript version](http://snipplr.com/view/41717/default-value-for-input-fields/).</p> ]]></description>
<pubDate>Wed, 02 Feb 2011 21:09:51 GMT</pubDate>
<guid>http://snipplr.com/view/48275/default-value-for-input-fields-jquery-version/</guid>
</item>
<item>
<title>(jQuery) jquery - clear text search - jelontok</title>
<link>http://snipplr.com/view/46460/jquery--clear-text-search/</link>
<description><![CDATA[ <p>simple jquery code to clear form fields</p> ]]></description>
<pubDate>Tue, 04 Jan 2011 11:30:17 GMT</pubDate>
<guid>http://snipplr.com/view/46460/jquery--clear-text-search/</guid>
</item>
<item>
<title>(jQuery) Show/hide form fields based on a selection from a dropdown menu - Rembrand</title>
<link>http://snipplr.com/view/38926/showhide-form-fields-based-on-a-selection-from-a-dropdown-menu/</link>
<description><![CDATA[ <p>Show a form field if 1 value from a dropdown is chosen, hide is the other is chosen. Can be extended to include more fields and values. Could get messy if you start nesting more than 2 'if else' but it gets the job done.</p> ]]></description>
<pubDate>Wed, 11 Aug 2010 19:26:05 GMT</pubDate>
<guid>http://snipplr.com/view/38926/showhide-form-fields-based-on-a-selection-from-a-dropdown-menu/</guid>
</item>
<item>
<title>(jQuery) Changing the default text value on focus with jQuery - Rembrand</title>
<link>http://snipplr.com/view/38925/changing-the-default-text-value-on-focus-with-jquery/</link>
<description><![CDATA[ <p>Originally from http://www.electrictoolbox.com (see src)\r\nClear the default value of a form field when you click on it (when you want to type) and put it back if you leave without typing anything.</p> ]]></description>
<pubDate>Wed, 11 Aug 2010 19:19:35 GMT</pubDate>
<guid>http://snipplr.com/view/38925/changing-the-default-text-value-on-focus-with-jquery/</guid>
</item>
<item>
<title>(jQuery) Switch textfield with a password field  (on focus) - Rembrand</title>
<link>http://snipplr.com/view/38924/switch-textfield-with-a-password-field--on-focus/</link>
<description><![CDATA[ <p>Originally form http://www.electrictoolbox.com\r\nComes in handy if you want to display a message in the field (\\\"type your password\\\") but mask the password itself.</p> ]]></description>
<pubDate>Wed, 11 Aug 2010 19:11:00 GMT</pubDate>
<guid>http://snipplr.com/view/38924/switch-textfield-with-a-password-field--on-focus/</guid>
</item>
<item>
<title>(jQuery) Textbox place holder - prsjohnny</title>
<link>http://snipplr.com/view/38912/textbox-place-holder/</link>
<description><![CDATA[ <p>Display a default value in a text field that disappears on focus and reappears on blur **if** the field is blank.</p> ]]></description>
<pubDate>Wed, 11 Aug 2010 14:42:46 GMT</pubDate>
<guid>http://snipplr.com/view/38912/textbox-place-holder/</guid>
</item>
<item>
<title>(jQuery) Inputs That Remember Original Value - iqwebdev</title>
<link>http://snipplr.com/view/37246/inputs-that-remember-original-value/</link>
<description><![CDATA[ <p>A jQuery snippet to make form inputs show a help message which disappears on click (and comes back when the user enters nothing). Give your input the classes ‘remember’ to activate the snippet and (optionally) ‘unfocused’ as a CSS hook for changing the styling of the help message.</p> ]]></description>
<pubDate>Wed, 14 Jul 2010 03:15:22 GMT</pubDate>
<guid>http://snipplr.com/view/37246/inputs-that-remember-original-value/</guid>
</item>
<item>
<title>(jQuery) Organize Tab Indeses using jQuery - tbelknap</title>
<link>http://snipplr.com/view/31755/organize-tab-indeses-using-jquery/</link>
<description><![CDATA[ <p>Keeping track of complex forms - especially those that exist within multiple jQuery UI tabs - can be a pain. This is a simple little function that will reorganize all visible inputs, buttons, drop-downs and links. Use it whenever switching between tabs or adding new elements to the form.</p> ]]></description>
<pubDate>Wed, 14 Apr 2010 08:49:31 GMT</pubDate>
<guid>http://snipplr.com/view/31755/organize-tab-indeses-using-jquery/</guid>
</item>
<item>
<title>(jQuery) Set Focus to the Next Input Field with jQuery - Meander365</title>
<link>http://snipplr.com/view/26969/set-focus-to-the-next-input-field-with-jquery/</link>
<description><![CDATA[ <p>I was recently faced with the problem of setting focus to the next input field. The challenge was that I didn’t know what that field was. So given an input field, find the next logical (in the order of the DOM) input field and set focus. I came up with the following jQuery function (plugin) to accomplish this:</p> ]]></description>
<pubDate>Sun, 24 Jan 2010 22:57:00 GMT</pubDate>
<guid>http://snipplr.com/view/26969/set-focus-to-the-next-input-field-with-jquery/</guid>
</item>
<item>
<title>(jQuery) Display hidden textfield if option is selected - landonmiller</title>
<link>http://snipplr.com/view/26823/display-hidden-textfield-if-option-is-selected/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 21 Jan 2010 14:23:34 GMT</pubDate>
<guid>http://snipplr.com/view/26823/display-hidden-textfield-if-option-is-selected/</guid>
</item>
<item>
<title>(jQuery) Display hidden textfield - landonmiller</title>
<link>http://snipplr.com/view/26822/display-hidden-textfield/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 21 Jan 2010 14:21:29 GMT</pubDate>
<guid>http://snipplr.com/view/26822/display-hidden-textfield/</guid>
</item>
<item>
<title>(jQuery) Toggle all checkboxes with jquery - gerhardsletten</title>
<link>http://snipplr.com/view/22358/toggle-all-checkboxes-with-jquery/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 03 Nov 2009 03:42:05 GMT</pubDate>
<guid>http://snipplr.com/view/22358/toggle-all-checkboxes-with-jquery/</guid>
</item>
<item>
<title>(jQuery) Clear Input field on focus_js - mauricenaef</title>
<link>http://snipplr.com/view/19375/clear-input-field-on-focusjs/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 08 Sep 2009 05:23:13 GMT</pubDate>
<guid>http://snipplr.com/view/19375/clear-input-field-on-focusjs/</guid>
</item>
<item>
<title>(jQuery) jQuery Form Builder - jonniespratley</title>
<link>http://snipplr.com/view/18647/jquery-form-builder/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 21 Aug 2009 06:59:22 GMT</pubDate>
<guid>http://snipplr.com/view/18647/jquery-form-builder/</guid>
</item>
</channel>
</rss>