<?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: Return domain information in form results</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Return domain information in form results</description>
<language>en</language>
<pubDate>Tue, 05 May 2026 07:52:29 +0000</pubDate>

<item>
<title>akerr on "Return domain information in form results"</title>
<link>https://www.machform.com/forums/topic/return-domain-information-in-form-results#post-18851</link>
<pubDate>Tue, 30 Jul 2013 04:34:56 +0000</pubDate>
<dc:creator>akerr</dc:creator>
<guid isPermaLink="false">18851@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;So I ended up finding the solution on the Machform 2 forum section, here's the full post: &#60;a href=&#34;http://www.appnitro.com/forums/topic/passing-a-url-into-a-hidden-field?replies=14&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/forums/topic/passing-a-url-into-a-hidden-field?replies=14&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Here's the solution:&#60;br /&#62;
&#60;strong&#62;In order for this solution to work you must use the JavaScript embed option.&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Step 1) Create a form text field and label it something along the lines of &#34;URL Reference&#34; then add the class hidden under the form field properties&#60;/p&#62;
&#60;p&#62;Step 2) Go to the &#34;edit themes&#34; tab within the Machform backend and modify your theme using the &#34;advanced CSS&#34; under the dropdown arrow near the top-right of the theme section, an add this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;.hidden {
display:none;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This code will hide the URL data from the user but pass it into the form so that when the user submits the form you can see on the backend.&#60;/p&#62;
&#60;p&#62;Step 3) Modify your embed code so that after the id=(in the example below 14641) you add the following snippet  &#60;code&#62;&#38;lt;?php echo &#38;#39;&#38;#38;element_4=&#38;#39;.urlencode($_SERVER[&#38;quot;SERVER_NAME&#38;quot;] . $_SERVER[&#38;quot;REQUEST_URI&#38;quot;]); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Make sure that you also modify the &#38;#38;element_4 to reflect the text field you created above to pass in the hidden value.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Modified Embed Code that passes in URL:&#60;/strong&#62;&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
var __machform_url = &#38;#39;http://mysite.com/forms/embed.php?id=14641&#38;lt;?php echo &#38;#39;&#38;#38;element_4=&#38;#39;.urlencode($_SERVER[&#38;quot;SERVER_NAME&#38;quot;] . $_SERVER[&#38;quot;REQUEST_URI&#38;quot;]); ?&#38;gt;&#38;quot;;
var __machform_height = 505;&#38;lt;/script&#38;gt;
&#38;lt;div id=&#38;quot;mf_placeholder&#38;quot;&#38;gt;&#38;lt;/div&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;http://mysite.com/forms/js/jquery.min.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;http://mysite.com/forms/js/jquery.ba-postmessage.min.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;http://mysite.com/forms/js/machform_loader.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Hope this helped you.
&#60;/p&#62;</description>
</item>
<item>
<title>akerr on "Return domain information in form results"</title>
<link>https://www.machform.com/forums/topic/return-domain-information-in-form-results#post-18846</link>
<pubDate>Tue, 30 Jul 2013 00:58:49 +0000</pubDate>
<dc:creator>akerr</dc:creator>
<guid isPermaLink="false">18846@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;So I am using the same form across a variety of sub domains (site1.example.com, site2.example.com, etc), I'm wanting to return the sub domain each time a person fills out the form from (for example site1.example.com), it would act similar to passing pack the IP details.  Thanks in advance.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
