<?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: Add class to input using php - not client side</title>
		<link>https://legacy.forums.gravityhelp.com/topic/add-class-to-input-using-php-not-client-side</link>
		<description>Gravity Support Forums Topic: Add class to input using php - not client side</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 16:30:10 +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/add-class-to-input-using-php-not-client-side" rel="self" type="application/rss+xml" />

		<item>
			<title>Richard Vav on "Add class to input using php - not client side"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-class-to-input-using-php-not-client-side#post-376164</link>
			<pubDate>Sun, 28 Jul 2013 09:36:30 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">376164@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If you still require assistance with this please open a new &#60;a href=&#34;http://www.gravityhelp.com/request-support/&#34; rel=&#34;nofollow&#34;&#62;support ticket&#60;/a&#62; or a &#60;a href=&#34;http://www.gravityhelp.com/priority-support/&#34; rel=&#34;nofollow&#34;&#62;priority support ticket&#60;/a&#62; if you are a developer license holder. Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh on "Add class to input using php - not client side"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-class-to-input-using-php-not-client-side#post-342108</link>
			<pubDate>Mon, 24 Jun 2013 10:01:36 +0000</pubDate>
			<dc:creator>Josh</dc:creator>
			<guid isPermaLink="false">342108@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am trying to simple add class to input element so I can use bootstrap classes etc. But I don't want to use javascript because it takes to long to fire depending on the page load.&#60;/p&#62;
&#60;p&#62;So I am trying to achieve it with php. But I can only seem to add classes to the input container. Which is not helping my bootstrap integration.&#60;/p&#62;
&#60;p&#62;I am using less for all the style adjustments that work beautifully with gravity forms.&#60;/p&#62;
&#60;p&#62;It's just that I would like to customise the input size across different forms, and add classes to the inputs. I know I could use this code below and add another style to the bootstrap.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// ADD CLASS TO SIDEBAR INPUTS
add_action(&#38;quot;gform_field_css_class&#38;quot;, &#38;quot;sidebar_custom_class&#38;quot;, 10, 3);
function sidebar_custom_class($classes, $field, $form){
	if($form[&#38;quot;id&#38;quot;] == 2 &#38;amp;&#38;amp; $field[&#38;quot;type&#38;quot;] == &#38;quot;text&#38;quot;){
		$classes .= &#38;quot; input-block-level&#38;quot;;
	}
    return $classes;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I'm curious if I can add classes to inputs directly to save the hassle of adding more styles.&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
