<?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: Zebra Print Bikini &#38; gform_pre_submission</title>
		<link>https://legacy.forums.gravityhelp.com/topic/zebra-print-bikini-gform_pre_submission</link>
		<description>Gravity Support Forums Topic: Zebra Print Bikini &amp; gform_pre_submission</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 23:48:24 +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/zebra-print-bikini-gform_pre_submission" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Zebra Print Bikini &#38; gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/zebra-print-bikini-gform_pre_submission#post-29686</link>
			<pubDate>Mon, 11 Jul 2011 16:25:32 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">29686@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You'd get the field input # by inspecting the form markup and seeing what the ID is for that input.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>aedstrom on "Zebra Print Bikini &#38; gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/zebra-print-bikini-gform_pre_submission#post-29672</link>
			<pubDate>Mon, 11 Jul 2011 15:50:30 +0000</pubDate>
			<dc:creator>aedstrom</dc:creator>
			<guid isPermaLink="false">29672@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It's not all that pretty, but this is now working!&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_pre_submission_1&#38;quot;, &#38;quot;pre_submission_handler&#38;quot;);

function pre_submission_handler($form){

global $_POST;

$VariableForceLowerCase = strtolower($_POST[&#38;quot;input_2&#38;quot;]);
$VariableSpaceToDashes = str_replace(&#38;quot; &#38;quot;, &#38;quot;-&#38;quot;,
$VariableForceLowerCase);

$_POST[&#38;quot;input_21&#38;quot;] = $VariableSpaceToDashes;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I struggled to figure out what the input_# was for the field I was working on. Any tip on easily knowing what the field number is?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>aedstrom on "Zebra Print Bikini &#38; gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/zebra-print-bikini-gform_pre_submission#post-29659</link>
			<pubDate>Mon, 11 Jul 2011 13:35:48 +0000</pubDate>
			<dc:creator>aedstrom</dc:creator>
			<guid isPermaLink="false">29659@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I need to take a text that the user inputs into a form, populate a hidden field and slightly manipulate the data prior to saving into the database.&#60;/p&#62;
&#60;p&#62;I want &#34;Zebra Print Bikini&#34; to become &#34;zebra-print-bikini&#34; in a different hidden field.&#60;/p&#62;
&#60;p&#62;I'm new to php. It seems if the 2nd field in my form contained &#34;Zebra Print Bikini&#34;, I would I need to do something like this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$newVariable = str_replace(&#38;quot; &#38;quot;, &#38;quot;-&#38;quot;, input_2);
$newnewVariable = strtolower($newVariable)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;In Gravity Forms I think I need to use gform_pre_submission. If the hidden field I want to place the new variable in is the first field in my form, I think I'd need to do something like this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_pre_submission&#38;quot;, &#38;quot;pre_submission_handler&#38;quot;);

function pre_submission_handler($form){
$newVariable = str_replace(&#38;quot; &#38;quot;, &#38;quot;-&#38;quot;, input_2);
$newnewVariable = strtolower($newVariable)
$_POST[&#38;quot;input_1&#38;quot;] = $newnewVariable;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And, this goes in my bp_custom.php since I'm using BuddyPress?&#60;/p&#62;
&#60;p&#62;Of course, I tried this and it didn't work so I'm asking for assistance. Appreciate it!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
