<?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: list in notifications to csv format</title>
		<link>https://legacy.forums.gravityhelp.com/topic/list-in-notifications-to-csv-format</link>
		<description>Gravity Support Forums Topic: list in notifications to csv format</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 03:25:04 +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/list-in-notifications-to-csv-format" rel="self" type="application/rss+xml" />

		<item>
			<title>digitalshift on "list in notifications to csv format"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/list-in-notifications-to-csv-format#post-48332</link>
			<pubDate>Sat, 04 Feb 2012 00:03:49 +0000</pubDate>
			<dc:creator>digitalshift</dc:creator>
			<guid isPermaLink="false">48332@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You guys are awesome! &#60;/p&#62;
&#60;p&#62;Thanks so much.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dana Cobb on "list in notifications to csv format"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/list-in-notifications-to-csv-format#post-48212</link>
			<pubDate>Thu, 02 Feb 2012 18:31:28 +0000</pubDate>
			<dc:creator>Dana Cobb</dc:creator>
			<guid isPermaLink="false">48212@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, Brian,&#60;/p&#62;
&#60;p&#62;I apologize for the delay in responding to this post. To get the information for the LIST field type, you can use something like the code below. When the form is posted, the LIST field is stored in an array. You can loop through the array and build your message. Since you know the count of columns for your list you can add a new line once all items for a row in the LIST have been added to the message. Take a look and let me know if you have questions.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;set_notification_message&#38;quot;);
function set_notification_message($form){
	//the list is an array of the values
	$list = rgpost(&#38;quot;input_3&#38;quot;); //get list field from $_POST
	$counter = 1; //initialize counter
	$column_count = 4; //number of columns in my list field
	//create message header
	$message = &#38;#39;&#38;quot;Player Name&#38;quot;,&#38;quot;Player Number&#38;quot;,&#38;quot;Player Position&#38;quot;, &#38;quot;Date of Birth (MM/DD/YYYY)&#38;quot;&#38;lt;br&#38;gt;&#38;#39;;
	//loop through items in list field
	foreach ($list as $list_item)
	{
		//add item to message surrounded by double-quotes
		$message .= &#38;#39;&#38;quot;&#38;#39; . $list_item . &#38;#39;&#38;quot;&#38;#39;;
		if ($counter == $column_count)
		{
			//add a new line to the message since a new row is starting; reset counter
			$message .= &#38;quot;&#38;lt;br&#38;gt;&#38;quot;;
			$counter = 1;
		}
		else
		{
			//add a comma and increment the counter
			$message .= &#38;quot;,&#38;quot;;
			$counter++;
		}
	}
	//set the new form notification
	$form[&#38;quot;notification&#38;quot;][&#38;quot;message&#38;quot;] = $message;
	//return modified form object
	return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>digitalshift on "list in notifications to csv format"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/list-in-notifications-to-csv-format#post-46672</link>
			<pubDate>Wed, 18 Jan 2012 01:49:20 +0000</pubDate>
			<dc:creator>digitalshift</dc:creator>
			<guid isPermaLink="false">46672@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Lists are currently displayed as follows in the notification email:&#60;/p&#62;
&#60;p&#62;Player Name	Player Number	Player Position	Date of Birth (MM/DD/YYYY)&#60;br /&#62;
Brian Stanton	19	D	55/55/5555&#60;br /&#62;
Sean Jones	21	F	55/55/5555&#60;/p&#62;
&#60;p&#62;However I want to echo the list in a csv format, for example:&#60;/p&#62;
&#60;p&#62;&#34;Player Name&#34;,&#34;Player Number&#34;,&#34;Player Position&#34;,&#34;Date of Birth (MM/DD/YYYY)&#34;&#60;br /&#62;
&#34;Mike Burke&#34;,&#34;11&#34;,&#34;F&#34;,&#34;11/11/1111&#34;&#60;br /&#62;
&#34;Brian Stanton&#34;,&#34;22&#34;,&#34;D&#34;,&#34;22/22/2222&#34;&#60;br /&#62;
&#34;Joe Bertaccini&#34;,&#34;33&#34;,&#34;G&#34;,&#34;33/33/3333&#34;&#60;/p&#62;
&#60;p&#62;I can do this for regular fields but I am not sure how I can do it for lists.&#60;/p&#62;
&#60;p&#62;Thanks&#60;/p&#62;
&#60;p&#62;Brian
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
