<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: How to stop users entering HTML?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/how-to-stop-users-entering-html</link>
		<description>Gravity Support Forums Topic: How to stop users entering HTML?</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 18:29:11 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/how-to-stop-users-entering-html" rel="self" type="application/rss+xml" />

		<item>
			<title>Phil on "How to stop users entering HTML?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-stop-users-entering-html#post-365158</link>
			<pubDate>Sat, 06 Jul 2013 11:55:08 +0000</pubDate>
			<dc:creator>Phil</dc:creator>
			<guid isPermaLink="false">365158@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If your form is creating a post, and the YouTube url form field will populate a custom field for the post, you might try something like this: &#60;/p&#62;
&#60;ol&#62;
&#60;li&#62;Using the form editor, create a &#34;Custom Field&#34; (found among the &#34;Post Fields&#34;).&#60;/li&#62;
&#60;li&#62;Under this new field's Properties tab, select &#34;Website&#34; from the &#34;Field Type&#34; dropdown. Now this field will undergo validation as url, possibly first by the browser due to the HTML5 setting Richard mentioned, but then because GFFormDisplay::validate() (in form_display.php) will see that this field's inputType is 'website' and will thus check GFCommon::is_valid_url() (in common.php).&#60;/li&#62;
&#60;li&#62;Then, select your &#34;Custom Field Name&#34; (still under the &#34;Properties&#34; tab). With the &#34;Existing&#34; radio button checked, this dropdown should include the name of your youtube url custom field, so long as you've previously saved at least one post with a value for that custom field (otherwise the custom field appears nowhere in the wp_postmeta table, whose meta_key entries are used to populate the &#34;Custom Field Name&#34; list). Or, perhaps you could choose the &#34;New&#34; radio button, if that approach better suits your needs.&#60;/li&#62;
&#60;/ol&#62;
&#60;p&#62;If you weren't intending to save the field value to a post's custom field, you may still find you could use a regular website field (not necessarily the &#34;Custom Field&#34; of website inputType), just to benefit from the related validation, then use the &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#34; rel=&#34;nofollow&#34;&#62;gform_after_submission&#60;/a&#62; hook to grab the field value and perform whatever actions you wish.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Richard Vav on "How to stop users entering HTML?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-stop-users-entering-html#post-363579</link>
			<pubDate>Fri, 05 Jul 2013 13:54:37 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">363579@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The validation error produced for the website field actually comes from the browser as it is part of the HTML5 standard that the browser developers have implemented for the url type input. You would have to create your own validation using the gform_field_validation filter David linked to in his reply above.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>davejmason on "How to stop users entering HTML?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-stop-users-entering-html#post-363318</link>
			<pubDate>Fri, 05 Jul 2013 10:17:30 +0000</pubDate>
			<dc:creator>davejmason</dc:creator>
			<guid isPermaLink="false">363318@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes unfortunately I can't use the website field as I need to output to a custom field within the theme. Is it possible to copy the validation code used for the website field in gravity forms? Or am I overlooking something (I'm not great at coding but I'm learning!)&#60;/p&#62;
&#60;p&#62;D
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Richard Vav on "How to stop users entering HTML?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-stop-users-entering-html#post-363274</link>
			<pubDate>Fri, 05 Jul 2013 09:44:20 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">363274@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;David's correct, if you are using a website field and have 'Output HTML5' set to 'Yes' on the Gravity Forms general settings page then you should see an error like this &#60;a href=&#34;http://i.imgur.com/TsIVuyG.png&#34; rel=&#34;nofollow&#34;&#62;http://i.imgur.com/TsIVuyG.png&#60;/a&#62; if you try and enter a youtube embed code for example.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "How to stop users entering HTML?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-stop-users-entering-html#post-363269</link>
			<pubDate>Fri, 05 Jul 2013 09:41:26 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">363269@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If you had used the Website field for taking the URL, then they would be receiving an error if they tried to add HTML to that field. If it is just a generic input field, then you'll have to create your own validation. &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_field_validation&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_field_validation&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>davejmason on "How to stop users entering HTML?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-stop-users-entering-html#post-363213</link>
			<pubDate>Fri, 05 Jul 2013 08:58:25 +0000</pubDate>
			<dc:creator>davejmason</dc:creator>
			<guid isPermaLink="false">363213@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a field where users must input a YouTube url, however some of them keep putting in the HTML embed code. I don't like the fact that anybody could submit HTML code directly onto my site. How can I disable this?&#60;/p&#62;
&#60;p&#62;Perhaps just disabling characters such as &#38;lt; and &#38;gt; would do it?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
