<?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: Need help with hidden fields with dynamic content</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Need help with hidden fields with dynamic content</description>
<language>en</language>
<pubDate>Thu, 18 Jun 2026 14:06:32 +0000</pubDate>

<item>
<title>mikimiki on "Need help with hidden fields with dynamic content"</title>
<link>https://www.machform.com/forums/topic/need-help-with-hidden-fields-with-dynamic-content#post-10666</link>
<pubDate>Sat, 16 Oct 2010 16:39:56 +0000</pubDate>
<dc:creator>mikimiki</dc:creator>
<guid isPermaLink="false">10666@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;hey, amerbazzi, I need this to ! I wa sjust posted about it!, Can I get you script version, please? you cam email me here: crv747 at gmail.com
&#60;/p&#62;</description>
</item>
<item>
<title>samerbazzi on "Need help with hidden fields with dynamic content"</title>
<link>https://www.machform.com/forums/topic/need-help-with-hidden-fields-with-dynamic-content#post-10566</link>
<pubDate>Wed, 29 Sep 2010 22:46:28 +0000</pubDate>
<dc:creator>samerbazzi</dc:creator>
<guid isPermaLink="false">10566@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;it works, thank you soooo much :)&#60;/p&#62;
&#60;p&#62;Excellent A+++ support,&#60;/p&#62;
&#60;p&#62;-Samer
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Need help with hidden fields with dynamic content"</title>
<link>https://www.machform.com/forums/topic/need-help-with-hidden-fields-with-dynamic-content#post-10562</link>
<pubDate>Wed, 29 Sep 2010 18:03:59 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10562@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Try to put those code directly into your view-functions.php file, particularly inside display_integrated_form() function.&#60;/p&#62;
&#60;p&#62;Search around line 2036:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$element[$j]-&#38;gt;default_value = htmlspecialchars($row[&#38;#39;element_default_value&#38;#39;]);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;below that line, you can add your code like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($form_id == 3 &#38;#38;&#38;#38; $row[&#38;#39;element_id&#38;#39;] == 6){

  // Include GeoIPLocator (path to source classes)
  include(&#38;quot;/home/content/v/b/x/vbxlms/html/geo/GeoIPLocator.class.php&#38;quot;);

  // Instance
  $geoip = new GeoIPLocator($_SERVER[&#38;#39;REMOTE_ADDR&#38;#39;]);

  // Getting IP Info (IPAddress Instance)
  $info = $geoip-&#38;gt;getIPInfo();

  // Getting Information about current IP
  // See API Documentation of IPAdress class for supported attributes

  # Getting city name (if it&#38;#39;s available)
  $element[$j]-&#38;gt;default_value = $info-&#38;gt;getCityName();
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>samerbazzi on "Need help with hidden fields with dynamic content"</title>
<link>https://www.machform.com/forums/topic/need-help-with-hidden-fields-with-dynamic-content#post-10560</link>
<pubDate>Wed, 29 Sep 2010 08:25:39 +0000</pubDate>
<dc:creator>samerbazzi</dc:creator>
<guid isPermaLink="false">10560@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;OK, I have been working on adding some hidden fields, I am actually adding a really nice feature, I will populate data such as City, State, Zip, etc. I get this information by getting the IP and than running it through an outside API which sends back the information, I have the data, no problem,&#60;/p&#62;
&#60;p&#62;Now I have the Iframe version working fine, no problems at all, I send the hidden fields data in the iframe URL as explained in another post on this forum,&#60;/p&#62;
&#60;p&#62;Here is the code I use for the IFrame version and it works perfectly fine: &#60;/p&#62;
&#60;p&#62;&#38;lt;iframe id=&#34;the_iframe&#34; onLoad=&#34;calcHeight();&#34; height=&#34;400&#34; allowtransparency=&#34;true&#34; frameborder=&#34;0&#34; scrolling=&#34;no&#34; style=&#34;width:100%;border:none&#34; src=&#34;/form-lead-management/embed.php?id=3&#38;#38;county=&#38;lt;?php&#60;/p&#62;
&#60;p&#62;    /**&#60;br /&#62;
     * Example 1&#60;br /&#62;
     *&#60;br /&#62;
     * Declaration of GeoIPLocator and it's simplest examples&#60;br /&#62;
     */&#60;/p&#62;
&#60;p&#62;    // Include GeoIPLocator (path to source classes)&#60;br /&#62;
    include(&#34;/home/content/v/b/x/vbxlms/html/geo/GeoIPLocator.class.php&#34;);&#60;/p&#62;
&#60;p&#62;    // Instance&#60;br /&#62;
    $geoip = new GeoIPLocator($_SERVER['REMOTE_ADDR']);&#60;/p&#62;
&#60;p&#62;    // Getting IP Info (IPAddress Instance)&#60;br /&#62;
    $info = $geoip-&#38;gt;getIPInfo();&#60;/p&#62;
&#60;p&#62;    // Getting Information about current IP&#60;br /&#62;
    // See API Documentation of IPAdress class for supported attributes&#60;/p&#62;
&#60;p&#62;    # Getting city name (if it's available)&#60;br /&#62;
    echo $info-&#38;gt;getCityName();&#60;br /&#62;
    echo &#34;&#34;;&#60;/p&#62;
&#60;p&#62;?&#38;gt;&#34; title=&#34;Contact Residential Home &#34;&#38;gt;&#60;a href=&#34;http://www.virtualbrix.com/form-lead-management/view.php&#34; title=&#34;Contact Residential Home &#34;&#62;Contact Residential Home &#60;/a&#62;&#38;lt;/iframe&#38;gt;&#60;/p&#62;
&#60;p&#62;What the code above does is add the city name that is looked up by the geo location script to the end of the URL, I than add the following code to the view-functions.php like this&#60;/p&#62;
&#60;p&#62;			if($form_id == 3 &#38;#38;&#38;#38; $row['element_id'] == 6){&#60;br /&#62;
	$element[$j]-&#38;gt;default_value = $_GET['county'];&#60;/p&#62;
&#60;p&#62;It works fine, everything is great,&#60;/p&#62;
&#60;p&#62;Now my headache, I have tried some things but just cant get the embed code to work,&#60;/p&#62;
&#60;p&#62;Yes, I know you have to add the above code in view-functions twice, that is fine, I have no problem with that, and when I tried to access an example page where I access the embed form and add some values to the url, for example: embed-example.php?id=3&#38;#38;county=test_test_city it works fine, but I need to use the following code for the script to get the city for me so I can dynamically pass it like I do for the iframe version,&#60;/p&#62;
&#60;p&#62;Now, I know, I know, people may say to use the Iframe version, I can't, When I finish this project, I will explain in more detail, I use JQuery and Sortable and everything but IE has a problem with dragging Iframes and Div content, all kinds of refresh issues, etc.&#60;/p&#62;
&#60;p&#62;So basically I have everything working, I just need to know where to place this code below where it is passed to the hidden field for embed mode since I have the IFrame version working fine,&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;/p&#62;
&#60;p&#62;    /**&#60;br /&#62;
     * Example 1&#60;br /&#62;
     *&#60;br /&#62;
     * Declaration of GeoIPLocator and it's simplest examples&#60;br /&#62;
     */&#60;/p&#62;
&#60;p&#62;    // Include GeoIPLocator (path to source classes)&#60;br /&#62;
    include(&#34;/home/content/v/b/x/vbxlms/html/geo/GeoIPLocator.class.php&#34;);&#60;/p&#62;
&#60;p&#62;    // Instance&#60;br /&#62;
    $geoip = new GeoIPLocator($_SERVER['REMOTE_ADDR']);&#60;/p&#62;
&#60;p&#62;    // Getting IP Info (IPAddress Instance)&#60;br /&#62;
    $info = $geoip-&#38;gt;getIPInfo();&#60;/p&#62;
&#60;p&#62;    // Getting Information about current IP&#60;br /&#62;
    // See API Documentation of IPAdress class for supported attributes&#60;/p&#62;
&#60;p&#62;    # Getting city name (if it's available)&#60;br /&#62;
    echo $info-&#38;gt;getCityName();&#60;br /&#62;
    echo &#34;&#34;;&#60;/p&#62;
&#60;p&#62;?&#38;gt;&#60;/p&#62;
&#60;p&#62;I hope someone can help, I have done so much work with this system, if anyone needs help with integration with salesforce, mail chimp, jquery, making it look pretty, etc, let me know,&#60;/p&#62;
&#60;p&#62;-Sam
&#60;/p&#62;</description>
</item>

</channel>
</rss>
