<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Form_Type_File does not get saved on preserve()</title> 
  <pubDate>Fri, 10 Apr 2026 20:05:50 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/14743</link> 
  <atom:link rel="self" type="application/rss+xml" title="Form_Type_File does not get saved on preserve()" href="https://bugs.horde.org/ticket/14743/rss" /> 
  <description>Form_Type_File does not get saved on preserve()</description> 
 
   
   
  <item> 
   <title>I whish to process a series of forms in a minor variation to</title> 
   <description>I whish to process a series of forms in a minor variation to https://wiki.horde.org/Doc/Dev/FormPackage. Form variables in a step are saved in the $vars object to process the successive step. All works well unless the variable is of type file.

I included a demo script that illustrates the point. If FormStage1 uses a variable of type integer everything works. However, if the type is file the gathered information is an array and preserve() fails:

dumping vars object:
Array
(
    [f_file] =&gt; Array
        (
            [name] =&gt; parsedFile-5.docx
            [type] =&gt; application/vnd.openxmlformats-officedocument.wordprocessingml.document
            [tmp_name] =&gt; /tmp/phppIjQKh
            [file] =&gt; /tmp/phppIjQKh
            [error] =&gt; 0
            [size] =&gt; 35069
        )

    [stage] =&gt; 2
    [f_bool] =&gt; 
)
</description> 
   <pubDate>Thu, 30 Nov 2017 08:47:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14743#t92596</link> 
  </item> 
   
  <item> 
   <title>Again, this is because you cannot set a default value (by pr</title> 
   <description>Again, this is because you cannot set a default value (by preserving) of a file field for security reasons.</description> 
   <pubDate>Thu, 30 Nov 2017 16:33:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14743#t92600</link> 
  </item> 
   
  <item> 
   <title>I see. But then, if form1 uploads the file it is already on </title> 
   <description>I see. But then, if form1 uploads the file it is already on the server.
What would be the preferred method of passing the file&#039;s name to form2?</description> 
   <pubDate>Thu, 30 Nov 2017 18:04:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14743#t92602</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
