<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Hyperlink on form set to Download only, is that possible?</title><link>https://www.infopathdev.com:443/forums/thread/86033.aspx</link><pubDate>Tue, 15 Jan 2013 02:08:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86033</guid><dc:creator>JenniferLindsay</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/86033.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=86033</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Hi JimiH,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Believe it or not, this has nothing to do with InfoPath and everything to do with the way browsers interpret links.&amp;nbsp; &lt;/p&gt;&lt;p&gt;What you will need is to upload a script to your site that will force links to download, and then to&amp;nbsp;modify the links in your form in such a way that the script is called and&amp;nbsp;download is forced.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Here&amp;#39;s a link to a PHP&amp;nbsp;script I&amp;#39;ve used before: &lt;a href="http://www.zubrag.com/scripts/download.php"&gt;http://www.zubrag.com/scripts/download.php&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Now, there&amp;#39;s a lot of stuff in this script, but to do what you want you will need to modify only&amp;nbsp;two lines:&lt;/p&gt;&lt;p&gt;(1)&lt;strong&gt; define(&amp;#39;BASE_DIR&amp;#39;,&amp;#39;/home/user/downloads/&amp;#39;);&lt;/strong&gt; &amp;lt;-- change the /home/user/downloads/ to point to the document library you want to download from&lt;/p&gt;&lt;p&gt;(2)&lt;strong&gt; $allowed_ext = array (&lt;/strong&gt;&amp;nbsp; &amp;lt;-- after this line make sure to add any MIME types you will need that are missing from the default script (here is a &lt;a href="http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;frm=1&amp;amp;source=web&amp;amp;cd=3&amp;amp;cad=rja&amp;amp;sqi=2&amp;amp;ved=0CEsQFjAC&amp;amp;url=http%3A%2F%2Fwww.iana.org%2Fassignments%2Fmedia-types&amp;amp;ei=5Lf0UMWCOI7vigKkmIH4Bg&amp;amp;usg=AFQjCNFQolf5rTMKsJloe8EDpJfp8YPXtg" target="_blank"&gt;list&lt;/a&gt; of MIME types)&amp;nbsp; If you&amp;#39;re in a hurry, the MIME type for xml forms and xsn templates is &amp;#39;application/xml&amp;#39;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Now supposing you&amp;#39;ve uploaded the download&amp;nbsp;script to the following location: mysite.com/path/to/script/&lt;/p&gt;&lt;p&gt;Then the link to download a form called&amp;nbsp;&amp;quot;myForm.xml&amp;quot; in your document library (the same library you&amp;nbsp;entered the path to in (1) above)&amp;nbsp;would look like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;a href="http://mysite.com/path/to/script/download.php?f=myForm.xml"&gt;http://mysite.com/path/to/script/download.php?f=myForm.xml&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;So just add a hyperlink that looks like this inside your form, and then when the user clicks the link he/she should be immediately prompted to download the file.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Good luck!&lt;/p&gt;</description></item><item><title>Hyperlink on form set to Download only, is that possible?</title><link>https://www.infopathdev.com:443/forums/thread/84815.aspx</link><pubDate>Wed, 28 Nov 2012 09:32:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84815</guid><dc:creator>JimiH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84815.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84815</wfw:commentRss><description>&lt;p&gt;Hello &lt;/p&gt;
&lt;p&gt;&amp;nbsp;As the title says, I have a form with links to a document library. When a user clicks one of the links&lt;/p&gt;
&lt;p&gt;i want the link not to open the file but download it.&lt;/p&gt;
&lt;p&gt;Is that possible?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;Geoff&lt;/p&gt;</description></item></channel></rss>