<?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>MachForm Community Forums Topic: AUTO INCREMENT FIELD</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: AUTO INCREMENT FIELD</description>
<language>en</language>
<pubDate>Wed, 06 May 2026 06:33:03 +0000</pubDate>

<item>
<title>redityo on "AUTO INCREMENT FIELD"</title>
<link>https://www.machform.com/forums/topic/auto-increment-field#post-2348</link>
<pubDate>Tue, 15 Jul 2008 07:37:48 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">2348@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;is there any error message show in your page? I have try that code on my server and it works fine. can you show me the url of your machform ?&#60;/p&#62;
&#60;p&#62;or maybe you can send me &#34;view-functions.php&#34; file to customer.service[at]appnitro.com, I will check it for you
&#60;/p&#62;</description>
</item>
<item>
<title>dennisturner on "AUTO INCREMENT FIELD"</title>
<link>https://www.machform.com/forums/topic/auto-increment-field#post-2344</link>
<pubDate>Mon, 14 Jul 2008 23:29:12 +0000</pubDate>
<dc:creator>dennisturner</dc:creator>
<guid isPermaLink="false">2344@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks.  I have entered this code and posted to my site.  I guess I need to read more about PHP to learn how to implement this information.  I put the auto increment field as the first field on my form.  But It does not get show on the page with the number.  Obviously there is something that I am not doing correctly.&#60;/p&#62;
&#60;p&#62;I also tried to set a different fields defualt value to: [#{entry_no}].   Since this value would work - I used the format needed for the email setup.  This did not work either.
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "AUTO INCREMENT FIELD"</title>
<link>https://www.machform.com/forums/topic/auto-increment-field#post-2325</link>
<pubDate>Fri, 11 Jul 2008 11:02:03 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">2325@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi .. &#60;/p&#62;
&#60;p&#62;you can make some modification on &#34;includes/view-functions.php&#34; files to make auto increment value,  try to insert this code in line 38 - 39&#60;/p&#62;
&#60;p&#62;I assume, you want to get auto increment value in form_1 in element_1. You also can make your own invoice number logic to that code :)&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//get auto increment value
$query = &#38;quot;SELECT
				max(element_1) max_id
			FROM
				ap_form_{$_GET[&#38;#39;id&#38;#39;]}
		 &#38;quot;;

$result = do_query($query);

$autoValue = 1;

while($row = do_fetch_result($result)){
	$autoValue = $row[&#38;#39;max_id&#38;#39;] + 1;
}		

if ($element-&#38;gt;id == &#38;#39;1&#38;#39; &#38;#38;&#38;#38; $_GET[&#38;#39;id&#38;#39;] == 1	)
	$element-&#38;gt;default_value = $autoValue;
else
	$element-&#38;gt;default_value = $element-&#38;gt;default_value;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>walags on "AUTO INCREMENT FIELD"</title>
<link>https://www.machform.com/forums/topic/auto-increment-field#post-2322</link>
<pubDate>Fri, 11 Jul 2008 07:14:54 +0000</pubDate>
<dc:creator>walags</dc:creator>
<guid isPermaLink="false">2322@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;you can set the default value of a field to be that of a session variable
&#60;/p&#62;</description>
</item>
<item>
<title>dennisturner on "AUTO INCREMENT FIELD"</title>
<link>https://www.machform.com/forums/topic/auto-increment-field#post-2319</link>
<pubDate>Fri, 11 Jul 2008 01:17:06 +0000</pubDate>
<dc:creator>dennisturner</dc:creator>
<guid isPermaLink="false">2319@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Is there any way to add an auto incrementing numeric field to a form?  One that could be used for an invoice number or receipt number.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
