Announcement

Collapse
No announcement yet.

Manual file browse in Form

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Manual file browse in Form

    I have a form with a field {filename} that contains a filename.
    Next to the field i want a button that the user can use to browse on the server to select a filename. The filename including the full path has to be copied to the field {filename} when the user selects a file.

    I tried to use a {Document - Filename} but then i have to select a database for the file and get a upload field on the form that i don't want.

    Can someone get me on the right track? Is there a example of a tutorial?

    Kind regards,

    Marco

  • #2
    document - filename is an upload field to upload your file to your application, as far as I understood from your first 2 lines it is exactly what you want to do, so either explain more that you mean by "user can use to browse on the server to select a filename" or give us a screenshot example of what you want to do for example?

    Comment


    • #3
      I have a field in a form where the user can type a filename including a fullpath. Instead of typing the filename / path i want to give the user the opportunity to select the file with a "browse" button which opens a file browser.

      Comment


      • #4
        great, then use document - file name if you want to allow user to select any file, and this will store only the file name in the database and will store the file in your folder under project/file folder or even you can create folder for each document using {fieldname} or global variable.

        if you want to allow only image uploading, then select image - file name, it will do the same but for images only is better to show even the image as a thumbnail you like later in grid or form

        now if you want to store the whole file in your database, then select document - database or image - database, and make your database can receive this file as a file/binary not a data field

        Comment


        • #5
          I just want to get the filename in the database, including the fullpath. I don't want to store the file anywhere.
          I have made a field in the form with a "input file field" that works, but how do i get the filename (and fullpath) in the "DRAWING_FN" field beside?

          file select scriptcase.png

          Comment


          • #6
            hi

            again, if you use file - file name or image - file name it will store the file name in your database

            you don't need the full path, when you use to "show" that file it will compile the full path for you from the place it is currently stored, and the file name will be added so you will have a full link to download the file.. you don't really need to put the full path there

            if for unknown reason you want just to show the path in that filed, you can go to your application > settings find something like Image Directory and documents path, now in Events preferable onLoad or in onScriptInit put something like {drawing_field}='your_path'.{fileNameField};

            in all cases, to know how to configure your full path and in production or in development environment, you need to read more about it in the forums, there are many topics about this.

            Comment

            Working...
            X