<?xml version="1.0" encoding="UTF-8"?>

<!--

	Feeds whisper secrets,
	In the RSS Club's embrace,
	Knowledge blooms in grace.

-->

<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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
xmlns:source="https://source.scripting.com/"
>

<channel>
	<title>child theme &#8211; notizBlog</title>
	<atom:link href="https://notiz.blog/tag/child-theme/feed/" rel="self" type="application/rss+xml" />
	<link>https://notiz.blog</link>
	<description>a weblog mainly about the open, portable, interoperable, small, social, synaptic, semantic, structured, distributed, (re-)decentralized, independent, microformatted and federated social web</description>
	<lastBuildDate>Tue, 28 Sep 2021 21:22:11 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://notiz.blog/wp-content/uploads/2019/10/cropped-notizblog-icon-1-32x32.png</url>
	<title>child theme &#8211; notizBlog</title>
	<link>https://notiz.blog</link>
	<width>32</width>
	<height>32</height>
</image> 
<creativeCommons:license>https://creativecommons.org/licenses/by-sa/4.0/</creativeCommons:license>
	<script xmlns="http://www.w3.org/1999/xhtml" type="application/json" id="pretty-feed-translations">{"translation-revision-date":"2026-07-06T10:30:00+00:00","generator":"WP-CLI\/2.12.0","source":"assets\/js\/pretty-feed.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"RSS feed icon":["RSS-Feed-Symbol"],"Web Feed":["Web-Feed"],"&lt;strong&gt;Look at you, following along the old-school way.&lt;\/strong&gt; Subscribe by copy-pasting the URL into your feed reader, or by clicking %1$shere%2$s...":["&lt;strong&gt;Sieh dich an, ganz old-school unterwegs.&lt;\/strong&gt; Abonniere den Feed, indem du die URL in deinen Feed-Reader kopierst oder %1$shier%2$s klickst ..."],"Visit %1$sAbout Feeds%2$s to get started with newsreaders and subscribing. It\u2019s free.":["Besuche %1$sAbout Feeds%2$s, um mit Newsreadern und dem Abonnieren zu starten. Es ist kostenlos."],"Visit Website":["Website besuchen"],"Recent Items":["Neueste Eintr\u00e4ge"],"Published:":["Ver\u00f6ffentlicht:"]}}}</script>
	<script xmlns="http://www.w3.org/1999/xhtml" src="https://notiz.blog/wp-includes/js/dist/hooks.min.js?ver=f0f188028580e8dc1255" defer=""/>
	<script xmlns="http://www.w3.org/1999/xhtml" src="https://notiz.blog/wp-includes/js/dist/i18n.min.js?ver=1dfe7db3940c23ea9216" defer=""/>
	<script xmlns="http://www.w3.org/1999/xhtml" src="https://notiz.blog/wp-content/plugins/pretty-feeds/assets/js/pretty-feed.js?ver=1.0.0" defer=""/>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://switchboard.p3k.io/"/>
<atom:link rel="self" href="https://notiz.blog/tag/child-theme/feed/"/>
<atom:link rel="search" type="application/opensearchdescription+xml" title="Search notizBlog" href="https://notiz.blog/wp-api/opensearch/1.1/document" />
	<source:account service="rss.chat">notizBlog</source:account>
	<source:self>https://notiz.blog/tag/child-theme/feed/</source:self>
<source:blogroll>https://notiz.blog/blogroll/?opml</source:blogroll>
	<item>
		<title>HTML5, Input-Types, Form-Validierung und WordPress</title>
		<link>https://notiz.blog/2011/07/11/html5-input-types-form-validierung-und-wordpress/</link>
					<comments>https://notiz.blog/2011/07/11/html5-input-types-form-validierung-und-wordpress/#comments</comments>
		
		<dc:creator><![CDATA[Matthias Pfefferle]]></dc:creator>
		<pubDate>Mon, 11 Jul 2011 18:46:37 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[FediBlog]]></category>
		<category><![CDATA[hCard]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[input-types]]></category>
		<category><![CDATA[Plugin]]></category>
		<guid isPermaLink="false">http://notizblog.org/?p=3840</guid>

					<description><![CDATA[Dass HTML5 ein paar neue input-types definiert, habe ich durch die hcard-input-brainstorming so am Rande auf geschnappt, mir aber nichts weiter dabei gedacht&#8230; Durch Zufall bin ich heute aber über folgenden Tweet von Sylvia Egger gestoßen: Just implemented native #HTML5 form validation on #wp comments form &#8211; it&#x27; quite simple &#38; should be in #wp [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image alignright" style="max-width:50%"><img decoding="async" src="https://notiz.blog/wp-content/uploads/2011/07/HTML5_Logo_256.png" alt="HTML5 Logo" /></figure>



<p class="wp-block-paragraph">Dass HTML5 ein paar neue input-types definiert, habe ich durch die <a href="http://microformats.org/wiki/hcard-input-brainstorming#HTML5_input_types">hcard-input-brainstorming</a> so am Rande auf geschnappt, mir aber nichts weiter dabei gedacht&#8230; Durch Zufall bin ich heute aber über folgenden <a href="http://twitter.com/sprungmarkers/status/90305500108947457">Tweet</a> von Sylvia Egger gestoßen:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
    <p>Just implemented native <a rel="tag" class="hashtag u-tag u-category" href="https://notiz.blog/tag/html5/">#HTML5</a> form validation on #wp comments form &#8211; it&#x27; quite simple &amp; should be in #wp default theme</p>
</blockquote>



<p class="wp-block-paragraph">und habe bissle recherchiert&#8230; Mit den neuen Input-Types ist es doch tatsächlich möglich Input-Felder über den Browser validieren zu lassen&#8230; Ich bin begeistert! 🙂</p>



<p class="wp-block-paragraph">Trägt man beispielsweise eine Nicht-Email-Adresse in folgendes Feld&#8230;</p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"email"</span> /&gt;</span></code></span></pre>


<p class="wp-block-paragraph">bekommt man&#8230;</p>



<figure class="wp-block-image aligncenter"><img decoding="async" src="https://notiz.blog/wp-content/uploads/2011/07/firefox-email-validation.jpg" alt="Email Validation im Firefox" /></figure>



<p class="wp-block-paragraph">Schön wenn man sich noch über solche Kleinigkeiten freuen kann oder 😉</p>



<p class="wp-block-paragraph">Lange rede kurzer Sinn: Da WordPress alle Formulare an zentraler Stelle definiert, ist es ziemlich einfach sie mit ein paar neuen Input-Types zu versehen. Mit dem folgenden Code wird das Kommentar-Formular mit den Typen &quot;email&quot; und &quot;url&quot; und das Suchformular mit dem Typ &quot;search&quot; (funktioniert nur in den WebKit-Browsern) erweitert:</p>



<p class="wp-block-paragraph"><ins><strong>Code-Update</strong>: <a href="https://yatil.de/">Eric Eggert</a> hat mich in den <a href="https://notiz.blog/2011/07/11/html5-input-types-form-validierung-und-wordpress/#comment-173210">Kommentaren</a> darauf hingewiesen, dass man mit <code>&lt;input required /&gt;</code> auch noch die Pflichtfelder validieren kann. Danke!</ins></p>



<p class="wp-block-paragraph"><ins><strong>Code-Update 2</strong>: Dank <a href="https://www.im-tal.net">maxe</a> werden jetzt auch die WordPress Settings berücksichtigt (Comment author must fill out name and e-mail) und das &quot;Comment&quot;-Feld ist natürlich auch <code>required</code></ins></p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="php"><span class="hljs-meta">&lt;?php</span>
<span class="hljs-comment">/*
Plugin Name: html5 input-types
Plugin URI: https://notiz.blog/
Description: Adds the new HTML5 input-types to WordPress' default forms
Version: 0.1
Author: pfefferle
Author URI: https://notiz.blog/
*/</span>

add_filter(<span class="hljs-string">"comment_form_default_fields"</span>, <span class="hljs-string">"change_comment_input_types"</span>);

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">change_comment_input_types</span><span class="hljs-params">($fields)</span> </span>{
  <span class="hljs-keyword">if</span> (get_option(<span class="hljs-string">"require_name_email"</span>, <span class="hljs-keyword">false</span>)) {
    $fields&#91;<span class="hljs-string">'author'</span>] = preg_replace(<span class="hljs-string">'/&lt;input/'</span>, <span class="hljs-string">'&lt;input required'</span>, $fields&#91;<span class="hljs-string">'author'</span>]);
    $fields&#91;<span class="hljs-string">'email'</span>] = preg_replace(<span class="hljs-string">'/"text"/'</span>, <span class="hljs-string">'"email" required'</span>, $fields&#91;<span class="hljs-string">'email'</span>]);
  } <span class="hljs-keyword">else</span> {
    $fields&#91;<span class="hljs-string">'email'</span>] = preg_replace(<span class="hljs-string">'/"text"/'</span>, <span class="hljs-string">'"email"'</span>, $fields&#91;<span class="hljs-string">'email'</span>]);
  }

  $fields&#91;<span class="hljs-string">'url'</span>] = preg_replace(<span class="hljs-string">'/"text"/'</span>, <span class="hljs-string">'"url"'</span>, $fields&#91;<span class="hljs-string">'url'</span>]);

  <span class="hljs-keyword">return</span> $fields;
}

add_filter(<span class="hljs-string">"get_search_form"</span>, <span class="hljs-string">"change_search_form_input_types"</span>);

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">change_search_form_input_types</span><span class="hljs-params">($form)</span> </span>{
  <span class="hljs-keyword">return</span> preg_replace(<span class="hljs-string">'/"text"/'</span>, <span class="hljs-string">'"search"'</span>, $form);
}

add_filter(<span class="hljs-string">"comment_form_field_comment"</span>, <span class="hljs-string">"change_comment_field_input_types"</span>);

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">change_comment_field_input_types</span><span class="hljs-params">($field)</span> </span>{
  <span class="hljs-keyword">return</span> preg_replace(<span class="hljs-string">'/&lt;textarea/'</span>, <span class="hljs-string">'&lt;textarea required'</span>, $field);
}
<span class="hljs-meta">?&gt;</span></span></code></span></pre>


<p class="wp-block-paragraph">Funktioniert als Plugin und in Child-Themes (einfach in die <code>functions.php</code> kopieren).</p>



<p class="wp-block-paragraph">Danke auch an <a href="https://marcgoertz.de/">Marc Görtz</a> der mich über <a href="http://twitter.com/dreamseer">Twitter</a> reichlich mit Links zu dem Thema versorgt hat:</p>



<ul class="wp-block-list">
    <li><a href="https://web.archive.org/web/20200724153910/http://diveintohtml5.info/forms.html">A Form of Madness (den hab ich selber gefunden)</a></li>
    <li><a href="https://web.archive.org/web/20110307142356/http://html5pattern.com/">HTML5 Pattern</a></li>
    <li><a href="https://web.archive.org/web/20100629022438/http://flowplayer.org/tools/demos/validator/index.html">Fallback jQuery Validator</a></li>
</ul>



<p class="wp-block-paragraph">Testen könnt ihr das übrigens hier auf notiz.blog.</p>
<hr /><p>Hey, RSS-Fan! Du bist cool. Bleib einfach großartig! 😎</p>]]></content:encoded>
					
					<wfw:commentRss>https://notiz.blog/2011/07/11/html5-input-types-form-validierung-und-wordpress/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
