		<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Appnitro Software Forums Topic: Multilanguage identical forms data processing and saving</title>
<link>http://www.appnitro.com/forums/</link>
<description>Appnitro Software Forums Topic: Multilanguage identical forms data processing and saving</description>
<language>en</language>
<pubDate>Wed, 08 Feb 2012 08:05:31 +0000</pubDate>

<item>
<title>gillesp on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-6052</link>
<pubDate>Mon, 01 Jun 2009 20:12:47 +0000</pubDate>
<dc:creator>gillesp</dc:creator>
<guid isPermaLink="false">6052@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;tbenko,&#60;/p&#62;
&#60;p&#62;did you found a solution to your problem?  I have the same.   Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>mkrakowiak on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5940</link>
<pubDate>Fri, 22 May 2009 03:37:06 +0000</pubDate>
<dc:creator>mkrakowiak</dc:creator>
<guid isPermaLink="false">5940@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;OK, here it goes:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;!-- What the code does, it queries two identical (set up for bilingual forms)
tables, pulls out data from specific fields (element_1, element_2 etc. but you
can figure out the column names by browsing your database through phpMyAdmin
for example) and sorts it. To see the code in action,
go to &#60;a href=&#34;http://dignityforall.ca/en/campaign-supporters&#34; rel=&#34;nofollow&#34;&#62;http://dignityforall.ca/en/campaign-supporters&#60;/a&#62; --&#38;gt;

&#38;lt;?php
mysql_connect(&#38;quot;HOST&#38;quot;, &#38;quot;DB_USER&#38;quot;, &#38;quot;PASSWORD&#38;quot;) or
die(&#38;#39;Cannot connect to the database because: &#38;#39; . mysql_error());
mysql_select_db (&#38;quot;DB_NAME&#38;quot;) or die(mysql_error());

// select organizations only - element_3 is checked whether a user signed on
as individual or for an organization
$query_organizations = &#38;quot;SELECT element_2 FROM ap_form_1 WHERE element_3 = &#38;#39;2&#38;#39;
UNION SELECT element_2 FROM ap_form_2 WHERE element_3 = &#38;#39;2&#38;#39; ORDER BY element_2 ASC&#38;quot;;

// select names and applicable organizations
$query_individuals = &#38;quot;SELECT CONCAT_WS(&#38;#39;, &#38;#39;, element_4, element_2) AS name
FROM ap_form_1 WHERE element_3 = &#38;#39;1&#38;#39; UNION SELECT CONCAT_WS(&#38;#39;, &#38;#39;, element_4,
element_2) AS name FROM ap_form_2 WHERE element_3 = &#38;#39;1&#38;#39; ORDER BY name ASC&#38;quot;;

$result_organizations = @mysql_query($query_organizations);
$num_organizations = mysql_num_rows($result_organizations); // counter
$result_individuals = @mysql_query($query_individuals);
$num_individuals = mysql_num_rows($result_individuals); // counter

echo &#38;#39;&#38;lt;strong&#38;gt;&#38;#39;.$num_organizations.&#38;#39; groups and &#38;#39;.$num_individuals.&#38;#39;
individuals have signed our petition.&#38;lt;/strong&#38;gt;
;

if ($num_organizations &#38;gt; 0) { // If it ran OK, display the records.

	echo &#38;quot;&#38;lt;strong&#38;gt;$num_organizations organizations have signed our petitions:
&#38;lt;/strong&#38;gt;&#38;lt;ol&#38;gt;&#38;quot;;

	// Fetch and print all the records.
	while ($row = mysql_fetch_array($result_organizations)) {
		echo &#38;#39;&#38;lt;li&#38;gt;&#38;#39; . $row[element_2] . &#38;#39;&#38;lt;/li&#38;gt;&#38;#39;;
	}

	echo &#38;#39;&#38;lt;/ol&#38;gt;&#38;#39;;

	mysql_free_result ($result_organizations);  //Free up the resources.	

} else { // If it did not run OK.
	echo &#38;#39;No organization have signed our petition yet.
&#38;#39;;
}

if ($num_individuals &#38;gt; 0) { // If it ran OK, display the records.

	echo &#38;quot;&#38;lt;strong&#38;gt;$num_individuals individuals have signed our petition:
&#38;lt;/strong&#38;gt;&#38;lt;ol&#38;gt;&#38;quot;;

	// Fetch and print all the records.
	while ($row = mysql_fetch_array($result_individuals)) {
		echo &#38;#39;&#38;lt;li&#38;gt;&#38;#39; . $row[name] . &#38;#39;&#38;lt;/li&#38;gt;&#38;#39;;
	}

	echo &#38;#39;&#38;lt;/ol&#38;gt;&#38;#39;;

	mysql_free_result ($result_individuals);  //Free up the resources.	

} else { // If it did not run OK.
	echo &#38;#39;No one have signed our petition yet.
&#38;#39;;
}
 ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>yuniar on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5928</link>
<pubDate>Thu, 21 May 2009 16:04:47 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">5928@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;feel free to post it here :-)
&#60;/p&#62;</description>
</item>
<item>
<title>mkrakowiak on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5905</link>
<pubDate>Wed, 20 May 2009 02:17:23 +0000</pubDate>
<dc:creator>mkrakowiak</dc:creator>
<guid isPermaLink="false">5905@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;tbenko, if you still need the code, let me know and I can send it to you. I can also post it here if anyone may find it useful.
&#60;/p&#62;</description>
</item>
<item>
<title>tbenko on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5820</link>
<pubDate>Wed, 13 May 2009 02:12:51 +0000</pubDate>
<dc:creator>tbenko</dc:creator>
<guid isPermaLink="false">5820@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Yes, I was thinking of that as a backup option and last resource...&#60;br /&#62;
I was hoping that I will get a sollution like a form id replacement at the saving stage of the code... so one of the forms will be saved in the data table of the other form...&#60;/p&#62;
&#60;p&#62;Seems to me that i will have to search the code, maybe I will have some luck and find the saving spot, where the query is put together...
&#60;/p&#62;</description>
</item>
<item>
<title>mkrakowiak on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5811</link>
<pubDate>Tue, 12 May 2009 02:32:24 +0000</pubDate>
<dc:creator>mkrakowiak</dc:creator>
<guid isPermaLink="false">5811@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;It happens that I need a similar solution and also in both French and English. I think you can create two seperate forms and then pull out data from them by using some PHP and MySQL code to display it on the results page.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5784</link>
<pubDate>Sat, 09 May 2009 07:20:09 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">5784@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Sorry, this one won't be possible. Each form has its own table and can't be merged.
&#60;/p&#62;</description>
</item>
<item>
<title>tbenko on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5779</link>
<pubDate>Fri, 08 May 2009 00:18:56 +0000</pubDate>
<dc:creator>tbenko</dc:creator>
<guid isPermaLink="false">5779@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Instead coludn't we save somehow a form's data as it were an other form's data? Let's say saving the french form data to the english form's records? So this way all the records go to one place.
&#60;/p&#62;</description>
</item>
<item>
<title>tbenko on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5776</link>
<pubDate>Thu, 07 May 2009 22:42:28 +0000</pubDate>
<dc:creator>tbenko</dc:creator>
<guid isPermaLink="false">5776@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Thanks for your response, however this sollution is not quite enough, because does not cover Form translation. Whenever I create a form, I add labels and explanations, form name and other info to the form. This info will not be translated with the sollution above.&#60;br /&#62;
Any new suggestions?
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5775</link>
<pubDate>Thu, 07 May 2009 21:54:50 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">5775@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;You can still use 1 form in 2 languages with little modification to machform files, so the data will be stored in one table. For example your form language are &#34;English&#34; and &#34;France&#34;, to do so try to follow this steps :&#60;/p&#62;
&#60;p&#62;1. Rename &#34;includes/language.php&#34; to &#34;includes/language-en.php&#34; and put &#34;language-fr.php&#34; as &#34;French&#34; language file.&#60;br /&#62;
2. Create a  &#34;language.php&#34; file in &#34;includes&#34; folder and put this code in there :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
/******************************************************************************
 MachForm

 Copyright 2007 Appnitro Software. This code cannot be redistributed without
 permission from &#60;a href=&#34;http://www.appnitro.com/&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/&#60;/a&#62;

 More info at: &#60;a href=&#34;http://www.appnitro.com/&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/&#60;/a&#62;
 ******************************************************************************/
	@session_start();
        $language_id = &#38;#39;en&#38;#39;;

	if (!empty($_GET[&#38;#39;lang&#38;#39;])) {
		$language_id = $_GET[&#38;#39;lang&#38;#39;];
	}

	switch ($language_id){
		case &#38;#39;fr&#38;#39; : require(&#38;#39;language-fr.php&#38;#39;);break;
		default: require(&#38;#39;language-en.php&#38;#39;);break;
	}		

?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;3. Give extra GET variable to your url. For example you call the form with this embed code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;iframe height=&#38;quot;352&#38;quot; allowTransparency=&#38;quot;true&#38;quot;
frameborder=&#38;quot;0&#38;quot;
scrolling=&#38;quot;no&#38;quot;
style=&#38;quot;width:100%;border:none&#38;quot;
src=&#38;quot;http://www.yourdomain.com/machform/embed.php?id=50&#38;quot;
title=&#38;quot;Untitled Form&#38;quot;&#38;gt;
&#38;lt;a href=&#38;quot;http://www.yourdomain.com/machform/view.php?id=50&#38;quot; title=&#38;quot;Untitled Form&#38;quot;&#38;gt;
Untitled Form
&#38;lt;/a&#38;gt;
&#38;lt;/iframe&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;change embed code to be like this, to get &#34;France&#34; language&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;iframe height=&#38;quot;352&#38;quot; allowTransparency=&#38;quot;true&#38;quot;
frameborder=&#38;quot;0&#38;quot;
scrolling=&#38;quot;no&#38;quot;
style=&#38;quot;width:100%;border:none&#38;quot;
src=&#38;quot;http://www.yourdomain.com/machform/embed.php?id=50&#38;#38;lang=fr&#38;quot;
title=&#38;quot;Untitled Form&#38;quot;&#38;gt;
&#38;lt;a href=&#38;quot;http://www.yourdomain.com/machform/view.php?id=50&#38;quot; title=&#38;quot;Untitled Form&#38;quot;&#38;gt;
Untitled Form
&#38;lt;/a&#38;gt;
&#38;lt;/iframe&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>tbenko on "Multilanguage identical forms data processing and saving"</title>
<link>http://www.appnitro.com/forums/topic/multilanguage-identical-forms-data-processing-and-saving#post-5758</link>
<pubDate>Thu, 07 May 2009 04:57:33 +0000</pubDate>
<dc:creator>tbenko</dc:creator>
<guid isPermaLink="false">5758@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;I would like to create a form in several languages with the same data fields. Can the data from this forms be saved somehow in just one table, so I do nat have to collect them from x different tables?&#60;br /&#62;
I'll put an example to be more specific: I have two forms, an english and a hungarian, collecting the same kind of data. The only difference between is the language. But the data collected needs to be processed as a single bunch of records, not two or more separate record tables.&#60;br /&#62;
Any suggestions? Thanks in advance.
&#60;/p&#62;</description>
</item>

</channel>
</rss>

