<?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: Creating a New Field</title>
		<link>https://legacy.forums.gravityhelp.com/topic/creating-a-new-field</link>
		<description>Gravity Support Forums Topic: Creating a New Field</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:56:31 +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/creating-a-new-field" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Creating a New Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-new-field#post-44461</link>
			<pubDate>Mon, 19 Dec 2011 23:41:01 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">44461@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks Travis.  Care to post your revised code?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Travis on "Creating a New Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-new-field#post-44343</link>
			<pubDate>Sun, 18 Dec 2011 22:39:21 +0000</pubDate>
			<dc:creator>Travis</dc:creator>
			<guid isPermaLink="false">44343@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I figured out the issue. You can close this topic.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Travis
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Travis on "Creating a New Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-new-field#post-44171</link>
			<pubDate>Thu, 15 Dec 2011 17:44:31 +0000</pubDate>
			<dc:creator>Travis</dc:creator>
			<guid isPermaLink="false">44171@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Now, when I test the Field Size, it is not resizing appropriately. Isn't this accurate?&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;// Adds the input area to the external side
add_action( &#38;quot;gform_field_input&#38;quot; , &#38;quot;wps_tos_field_input&#38;quot;, 10, 5 );
function wps_tos_field_input ( $input, $field, $value, $lead_id, $form_id ){
	//print_r($field);

    if ( $field[&#38;quot;type&#38;quot;] == &#38;quot;tos&#38;quot; ) {
		$max_chars = &#38;quot;&#38;quot;;
		if(!IS_ADMIN &#38;amp;&#38;amp; !empty($field[&#38;quot;maxLength&#38;quot;]) &#38;amp;&#38;amp; is_numeric($field[&#38;quot;maxLength&#38;quot;]))
			$max_chars = self::get_counter_script($form_id, $field_id, $field[&#38;quot;maxLength&#38;quot;]);

		$input_name = $form_id .&#38;#39;_&#38;#39; . $field[&#38;quot;id&#38;quot;];
		$tabindex = GFCommon::get_tabindex();
		return sprintf(&#38;quot;&#38;lt;div class=&#38;#39;ginput_container&#38;#39;&#38;gt;&#38;lt;textarea name=&#38;#39;input_%s&#38;#39; id=&#38;#39;%s&#38;#39; class=&#38;#39;textarea %s&#38;#39; $tabindex rows=&#38;#39;10&#38;#39; cols=&#38;#39;50&#38;#39;&#38;gt;%s&#38;lt;/textarea&#38;gt;&#38;lt;/div&#38;gt;{$max_chars}&#38;quot;, $field[&#38;quot;id&#38;quot;], &#38;#39;tos-&#38;#39;.$field[&#38;#39;id&#38;#39;] , $field[&#38;quot;type&#38;quot;] . &#38;#39; &#38;#39; . esc_attr($field[&#38;#39;cssClass&#38;#39;]) , esc_html($value));

    }

    return $input;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Creating a New Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-new-field#post-44128</link>
			<pubDate>Thu, 15 Dec 2011 06:27:27 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">44128@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You are close. In your code snippet above, replace:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;fieldSettings[&#38;quot;textarea&#38;quot;] += &#38;quot;, .tos_setting&#38;quot;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;with&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;//Add all textarea settings to the &#38;quot;TOS&#38;quot; field plus custom &#38;quot;tos_setting&#38;quot;
fieldSettings[&#38;quot;tos&#38;quot;] = fieldSettings[&#38;quot;textarea&#38;quot;] + &#38;quot;, .tos_setting&#38;quot;;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Travis on "Creating a New Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-new-field#post-44116</link>
			<pubDate>Thu, 15 Dec 2011 00:16:16 +0000</pubDate>
			<dc:creator>Travis</dc:creator>
			<guid isPermaLink="false">44116@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks Alex. I've incorporated this; however, this adds a placement input area to OTHER fields, but not the newly created custom field, TOS.&#60;/p&#62;
&#60;p&#62;Here's the newly added code from the previous pastebin:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action( &#38;quot;gform_editor_js&#38;quot;, &#38;quot;my_gform_editor_js&#38;quot; );
function my_gform_editor_js(){
?&#38;gt;

&#38;lt;script type=&#38;#39;text/javascript&#38;#39;&#38;gt;
	//adding setting to fields of type &#38;quot;text&#38;quot;
	fieldSettings[&#38;quot;textarea&#38;quot;] += &#38;quot;, .tos_setting&#38;quot;;
	//binding to the load field settings event to initialize the checkbox
	jQuery(document).bind(&#38;quot;gform_load_field_settings&#38;quot;, function(event, field, form){
		jQuery(&#38;quot;#field_tos&#38;quot;).val(field[&#38;quot;tos&#38;quot;]);
	});
&#38;lt;/script&#38;gt;

&#38;lt;?php
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;New pastebin: &#60;a href=&#34;http://pastebin.com/iDxYWPbY&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/iDxYWPbY&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Is there a way to add a conditional. What I am trying to do is to create an advanced version of the Paragraph Text. And this is a big stumbling block for me. In essence I want to add an input text box to the Settings, but everything else should be the same.&#60;/p&#62;
&#60;p&#62;Pic of my new custom field: &#60;a href=&#34;http://wpsmith.net/files/temp/new-tos-custom-field.png&#34; rel=&#34;nofollow&#34;&#62;http://wpsmith.net/files/temp/new-tos-custom-field.png&#60;/a&#62;&#60;br /&#62;
Pic of the paragraph field: &#60;a href=&#34;http://wpsmith.net/files/temp/paragraph-text-field.png&#34; rel=&#34;nofollow&#34;&#62;http://wpsmith.net/files/temp/paragraph-text-field.png&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Creating a New Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-new-field#post-44056</link>
			<pubDate>Wed, 14 Dec 2011 19:00:53 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">44056@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello Travis,&#60;br /&#62;
If you look at the following doc page, there is a sample on how to create a new custom setting.&#60;br /&#62;
In that example, note line 24:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;fieldSettings[&#38;quot;text&#38;quot;] += &#38;quot;, .encrypt_setting&#38;quot;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This line is assigning the new custom setting &#34;encrypt_setting&#34; to fields of type text. You will need to do something similar to your custom field, but replacing &#34;text&#34; with your custom field name. You can also assign any of the built-in settings such as label, default value, conditional logic, etc... I don't have a full list of all available settings, but if you look at the end of the gravityforms/js/forms.js file, you will see how the built-in settings are assigned to the existing fields. That should help you choose the settings you need for your field.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Travis on "Creating a New Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-new-field#post-44021</link>
			<pubDate>Wed, 14 Dec 2011 11:47:53 +0000</pubDate>
			<dc:creator>Travis</dc:creator>
			<guid isPermaLink="false">44021@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;So I have &#34;successfully&#34; created a new field; however, none of the properties or the advanced input areas appear (as I would like to use some of the default ones). How do I 'enable' them?&#60;/p&#62;
&#60;p&#62;Here's my attempt so far: &#60;a href=&#34;http://pastebin.com/Kgf195d2&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/Kgf195d2&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
