Media Field

media form field general look

Sometimes you need the users to have an opportunity to upload media files to your website. For example, that could be a personal photo or a photo of documents. The Media Field adds a button to the form that allows users to load a media file from their PC to the website. The media files uploaded this way will be stored in the JetFormBuilder folder (wordpress\htdocs\wp-content\uploads\jet-form-builder) on the PC where your WordPress is installed. Also, the Media Field contains protection for directories where files are saved.

After the JetFormBuilder 2.1.0 plugin version, the media field shows not only the thumbnails of the uploaded pictures but also the uploaded file name or the number of files. To be able to upload several files, set the number of Maximum allowed files to upload in the field settings.

media fields on the front end

Settings

media form field settings

Field Settings

  • User access. In this drop-down menu, you can choose the type of users that will be able to upload media files. Those could be all registered users (Any registered user), all users to whom you permitted to upload files (Any user who is allowed to upload files), the users to whom you permitted to edit posts (Any user who is allowed to edit posts) and all users in general, including guests (Any user). Be aware that allowing all users to upload files could make your website a target of spam and inappropriate content;
  • Insert attachment. When this toggle is turned off, the uploaded media files are stored in the folder on the PC, and you don’t have access to them via Media Library. After enabling this toggle, you can choose how to store the files in the Library. In the Field value drop-down, there are three options: to store the ID of the file (Attachment ID), the URL of the file (Attachment URL), and both of them (Array with attachment ID and URL);
  • Maximum allowed files to upload. This is the feature where you can define how many files the user will be able to upload;
  • Maximum size in MB. By default, the maximum file size the user can upload is 40MB. If you want to set another value, you can do it here;
  • Allow MIME types. From this list, you can select the types of files you allow the users to upload. You can choose several types by pressing and holding the “Ctrl” (for Windows) or “Command” (for Mac) button while clicking on the options. If you don’t choose any of the options here, all of them will be allowed for upload.

Style Settings

media form field styling

If you have installed the JetStyleManager plugin, the Block Style button will appear in the top right corner of the editing window. Here are the styling settings you can meet there: