<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UserForm | Nerdpress.org</title>
	<atom:link href="https://nerdpress.org/tag/userform/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerdpress.org</link>
	<description>...dev, tech problems and solutions.</description>
	<lastBuildDate>Fri, 20 Apr 2012 19:33:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>how to add placeholder attributes in Silverstripe Userforms Module</title>
		<link>https://nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/</link>
					<comments>https://nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/#comments</comments>
		
		<dc:creator><![CDATA[Max Girkens]]></dc:creator>
		<pubDate>Thu, 19 Apr 2012 04:32:28 +0000</pubDate>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[placeholder]]></category>
		<category><![CDATA[UserForm]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=2160</guid>

					<description><![CDATA[<p>to be honest i didn&#8217;t find a clean way yet, but i thought this workaround might be worth sharing. &#8230;since Silverstripes&#8216; Userforms Module Uses jQuery for Validation you can put these lines of code in your UserDefinedForm.ss Template: This will iterate over the labels in the form , build placeholder attributes from each one and &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/" class="more-link">Continue reading<span class="screen-reader-text"> "how to add placeholder attributes in Silverstripe Userforms Module"</span></a></p>
The post <a href="https://nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/">how to add placeholder attributes in Silverstripe Userforms Module</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>to be honest i didn&#8217;t find a clean way yet, but i thought this workaround might be worth sharing.</p>
<p>&#8230;since <a href="http://www.silverstripe.org/">Silverstripes</a>&#8216; <a href="http://www.silverstripe.org/user-forms-module/">Userforms Module</a> Uses jQuery for Validation you can put these lines of code in your UserDefinedForm.ss Template:<span id="more-2160"></span></p>
<pre class="brush: jscript; title: ; notranslate">
jQuery(document).ready(function(){
    jQuery('form label').each(function(){
      jQuery(this).parent().find('input, textarea').attr('placeholder', jQuery(this).html());
      jQuery(this).remove();
    })
  });
</pre>
<p>This will iterate over the labels in the form , build placeholder attributes from each one and then remove it.</p>
<p>If anyone knows a way how to do this in PHP, i&#8217;d appreciate a comment :)</p>The post <a href="https://nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/">how to add placeholder attributes in Silverstripe Userforms Module</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
					<wfw:commentRss>https://nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
	</channel>
</rss>
