3 Replies Latest reply on Apr 18, 2013 9:34 AM by mikebeargie

    Webviewer form file field

    Olivier_Chenot

      Hi,

       

      I am using a webviewer containing a form, containing itself a file field, use to send file to an extern web site, using POST method, multipart/form-data.

      The question is : how can I set selection folder when user click on file selection button in my form ?

       

      Filemaker always open on folder used during last file selection. Is it possible to force it to a value I want to set ?

      Thanks

        • 1. Re: Webviewer form file field
          mikebeargie

          Olivier,

           

          If I am reading this correctly, you are choosing a file to send via a form you have loaded in the webviewer. Based on what I've read above you want to manually set the folder location of the file selection dialog box that the form (inside the web viewer) uses.

           

          This is not a filemaker controlled thing. The webviewer interacts just like a web browser, so if you think about your form running in IE or safari, it's the same type of action. That dialog box is the system dialog box for file selection.

           

          So, to be able to set the path of the file selection, you must do so in your web form you are loading in the web viewer, not inside of filemaker itself. Without any more details on your web form, I can't offer any advice on how you would set that.

           

          I would do some google or stackoverflow.com searches for "___ set file selection path" where ____ = the language your form is written in (IE PHP, JQUERY, etc..)

          • 2. Re: Webviewer form file field
            Olivier_Chenot

            Hi Mike,

             

            Thank you for your answer, unfortunately, What I experience is :

            - If I open my form outside FileMaker (directly from windows browser), and change folder, it has no effect on next FileMaker opened selection dialog box.

            - If I open any selection dialog box in FileMaker (using TroiFile plugin), with no relation to my form, it changes next FileMaker opened selection dialog box.

            - When I open my form from FileMaker, selection dialog box shows a FileMaker Icon (see attached file).

             

            So that I guess FileMaker is involved...

            • 3. Re: Webviewer form file field
              mikebeargie

              You didn't mention you were using a plugin in your original post.

               

              I'm not terribly familiar with TroiFile, but I suspect that since this part is in your html:

              <input type="file" name="fichier" id="filename" size="60">

              That it is still using the default system OS dialog (even with a filemaker icon, which is probably displayed because you are opening the dialog inside filemaker).

               

              Unfortunately, from what I've read, it seems that the system OS will not let you control the default folder that is displayed in that dialog box for security reasons. Saving the last location used and resetting the location seem to be actions built into the OS.