como-criar-um-formulário-de-contato-wordpress-com-vários-uploads-de-arquivos

How to Create a WordPress Form with Multiple File Uploads

Want to let your users upload multiple files through your WordPress forms? You’re in the right place. In this guide, I’ll walk you through creating professional-looking forms with multiple file upload fields – no coding required.

This method is perfect for collecting portfolios, documentation, or any situation where you need users to submit multiple files at once.

Crie seu formulário WordPress agora

How to Allow Multiple File Uploads to WordPress Contact Forms

Giving your website visitors the ability to upload a file in your WordPress form makes it easier for you to collect the information you need. But sometimes you need more than just one file from them. For example, if you have a job application form, you may need to collect a resume as well as a cover letter.

WPForms is a great option for a file upload plugin if you want the ease of creating a file upload field with a drag-and-drop form builder. By default, the WPForms File Upload field allows users to upload multiple files at a time. All you need to do is add the field to your form.

Here’s what I’ll be covering in this tutorial:

Ready? Let’s get started!

Step 1: Create a File Upload Form in WordPress

For this tutorial, I’m going to assume you don’t have your form built yet and start from the beginning. If you already have a form and just want to see how to add a File Upload field to it, you’ll see how to simply drag the field onto your form in the editor in this 1st step.

A primeira coisa que você precisará fazer é instalar e ativar o plugin WPForms. Para mais detalhes sobre como instalá-lo, consulte este guia passo a passo sobre como instalar um plugin no WordPress.

Next, go to your WordPress dashboard and click on WPForms » Add New in the left-hand panel to create a new form and name it. You can choose whatever name you’d like.

Nomeando seu formulário de upload de arquivos

Em seguida, role para baixo até a seção Selecionar um Modelo e pesquise pelo modelo de formulário de upload de arquivos. Em seguida, clique em Usar Modelo para abri-lo.

Escolhendo o modelo de Formulário de Upload de Arquivos

WPForms will now populate a pre-built File Upload Form and display the drag and drop builder.

O modelo de Formulário de Upload de Arquivos

Here, you can add additional fields to your contact form by dragging them from the left-hand panel to the right-hand preview area.

Com o modelo de formulário de upload de arquivos, você já terá os campos Nome, Email, Telefone, Upload de Arquivo e Comentários Adicionais .

Click on any of the form fields to make changes. You can also click on a form field and drag it up and down to rearrange the order on your form.

Note: You can add the File Upload field to any WordPress form you create. Just drag the File Upload form field, found under Fancy Fields, from the left-hand panel of the form builder to the preview area.

Adicionando um campo de Upload de Arquivos a um formulário de contato

Etapa 2: Configure as Opções do Campo de Upload de Arquivos

You can click on the File Upload field to open its field options.

Personalizando as opções de campo para um campo de Upload de Arquivo

Aqui você pode alterar a:

  • Label — Name the form field so your site visitors know what it’s for.
  • Description — Add a description explaining details to users. For example, if you only want people to upload an image, tell them that.
  • Extensões de Arquivo Permitidas — Se você deseja restringir os tipos de arquivos que podem ser enviados em seu formulário do WordPress, liste-os aqui, cada um separado por vírgula
  • Max File Size — Specify, in megabytes, the max size file you’ll allow users to upload. If you leave this blank, WPForms will default to the maximum file size that your web host allows. If you need to change this, see this tutorial on how to increase the maximum file upload size in WordPress.
  • Max File Uploads — Set the maximum number of files users can add to this form.
  • Required — If you want to require that users upload a file before they can submit their form, toggle this option on.

Once you’ve customized the general field options, click on the Advanced tab. Here, make sure the Style is set to Modern.

This is important because the Classic style doesn’t allow multiple file uploads.

Need an Instant Photo?

Enable the Camera option within the File Upload field’s Advanced tab to allow users to capture a photo or video directly through the form.

Wondering where these file uploads will be stored?

By default, all files uploaded by users are stored in the WPForms folder inside the Uploads directory of your site. To make things easier, you can also store these files in your WordPress Media Library by toggling on the Store field in WordPress Media Library option.

Setting a File Upload field to store files in the Media Library

If you want to restrict access to uploaded files, that’s easy to do in WPForms. In the File Upload field’s Advanced tab, you’ll also so a toggle switch to Enable File Access Restrictions.

Advanced File Upload Options

When you select this option, you can restrict access through password protection, or you can restrict it based on user roles. If you select user roles, the user must be logged in to access the uploaded files.

I’ll also show you how to access uploaded files from the Entries screen and in your form’s email notifications.

You can make forms look great by following the steps in our post on how to create a Multi-step form in WordPress. But for the sake of this tutorial, we’ll stick with a single page.

Step 3: Customize Your Form Settings

Para começar, vá para Configurações » Geral.

Acessando as configurações gerais de um formulário

Aqui você pode configurar o seguinte:

  • Nome do Formulário — Altere o nome do seu formulário aqui, se desejar.
  • Descrição do Formulário — Dê uma descrição ao seu formulário.
  • Tags — Add tags to your form to help keep your WordPress forms organized.
  • Texto do Botão Enviar — Personalize o texto do botão de envio.
  • Submit Button Processing Text — Change the text that shows while your form is submitting.

You can also expand the Advanced settings to configure the following options:

  • Classes CSS — Adicione CSS personalizado ao seu formulário ou botão de envio.
  • Prefill by URL — Automatically fill some fields based on a custom URL.
  • Ativar envio de formulário AJAX — Ative as configurações AJAX sem recarregar a página.
  • Desativar o armazenamento de informações de entrada no WordPress — Você pode desativar o armazenamento de informações de entrada e detalhes do usuário, como endereços IP e agentes de usuário, em um esforço para cumprir os requisitos do GDPR. Confira nossas instruções passo a passo sobre como adicionar um campo de acordo com o GDPR ao seu formulário de contato simples.

Once you’re done in the general settings, click on the Spam Protection and Security settings.

Abrindo as configurações de spam e segurança do formulário
  • Ativar proteção anti-spam — Interrompa o spam em formulários de contato com o recurso anti-spam, hCaptcha ou Google reCAPTCHA. A caixa de seleção anti-spam é marcada automaticamente em todos os novos formulários.
  • Enable Akismet anti-spam protection — If you use the Akismet plugin to manage spam, you can connect it to this form to prevent fake submissions.
  • Enable country filter — Block submissions from certain countries.
  • Enable keyword filers — Prevent submissions that include certain words or phrases.

You can also set up a CAPTCHA to block spam entries. Check out our complete guide to anti-spam settings for more details.

E quando terminar, clique em Salvar.

Etapa 4: Configure as Notificações do Seu Formulário

Notifications are an excellent way to know when someone submits one of your forms.

E, a menos que você desative o recurso de notificação, você receberá uma notificação por e-mail sempre que alguém enviar um formulário em seu site.

Acessando as configurações de notificações de um formulário

Para receber uma mensagem de e-mail quando alguém preencher seu formulário, você precisará configurar notificações de formulário no WordPress e fornecer seu endereço de e-mail.

Also, if you use Smart Tags, you can send a personalized notification to your site visitors once they finish your form to let them know you received it. This assures users their form has gone through properly.

To include the uploaded files in your email notification, use a Smart Tag to include the content of the File Upload field in the body of the email. This will add links you can click to see the uploaded files.

An email notification with multiple file upload links

Para saber mais sobre isso, confira nosso guia passo a passo sobre como enviar várias notificações de formulário no WordPress.

If you would rather include the uploaded files as email attachments, scroll to the bottom of your notification and expand the Advanced settings. Then toggle on the Enable File Upload Attachments setting.

Habilitando anexos de upload de arquivos para uma notificação por e-mail

Keep in mind that some email providers won’t deliver emails with large attachments. You can change the maximum file size in the field options as we showed in Step 2.

In addition, you have the option to easily brand your notification emails by adding your logo or any image you choose in the custom header image area. The image you choose will show up at the top of email notifications like the WPForms logo below.

Uma notificação por e-mail com uma imagem de cabeçalho personalizada

Step 5: Configure Your Form’s Confirmations

Form confirmations are ways to take action immediately (and automatically) after your user has submitted information to your form. For extra help with this step, check out our tutorial on how to setup form confirmations.

Existem 3 tipos diferentes de confirmações no WPForms:

  1. Mensagem — Este é o tipo de confirmação padrão que aparece depois que alguém clica em enviar em seu formulário, e é personalizável. Confira nossas dicas sobre maneiras de personalizar sua mensagem de confirmação para aumentar a felicidade dos visitantes do seu site.
  2. Display Page — Automatically send users to any page on your site like a thank you page
  3. Redirecionar — Útil se você quiser levar o usuário para um site diferente ou URL especializado para desenvolvimento mais complexo.

So let’s see how to set up a simple form confirmation in WPForms so you can customize the success message site visitors will see when they submit a form on your site.

To start, click on the Confirmations tab in the form builder under Settings.

Em seguida, selecione o tipo de confirmação que você gostaria de criar. Para este exemplo, selecionaremos Mensagem.

Personalizando a mensagem de confirmação do formulário de upload de arquivos

Em seguida, personalize a mensagem de confirmação a seu gosto e clique em Salvar quando terminar.

Now you’re ready to add your form to your website.

Step 6: Add Your Form to Your Website

After you’ve created your form, you need to add it to your WordPress website. WPForms lets you add your forms to multiple places on your website including your pages, blog posts, and sidebar widgets.

So let’s take a look at the most common placement option, page or post embedding.

To begin, create a new page or post in WordPress, or open an existing one in the editor. After that, add a new block and select WPForms. You can search for it if you don’t see it right away.

Adicionando um bloco WPForms a uma página

Now, the WPForms widget will appear inside of your block. Click on the WPForms dropdown and pick the file upload form you’ve already created that you want to insert into your page.

Selecionando um formulário de upload de arquivos no bloco WPForms

Next, click on the blue button in the top right that says either Publish or Update, so your form will appear on your website.

Publicando um formulário de upload de arquivos

That’s it! Your form is now on your website.

Step 7: View The Files

O WPForms armazena cada envio de formulário como uma entrada. Para visualizar arquivos enviados, vá para WPForms » Entradas.

And from there, select the right form from the dropdown menu and click on View.

Visualizando uma entrada para o seu formulário de upload de arquivo

Here you can view or download the file uploads for this entry.

A form entry with multiple file uploads

Better yet, you can use our Zapier addon to automatically save all file uploads to different web apps like:

Create Your Multiple File Upload Form Now

FAQ — WordPress File Uploads

What kind of files can be uploaded to WordPress?

The WPForms plugin makes it easy for your site visitors to upload all kinds of file types to your contact forms. You can embed a File Upload field to upload:

  • Documentos (.doc, .xls, .ppt e .pdf)
  • Imagens (.png, .gif e .jpg)
  • Vídeo (.mpg, .mov e .wmv)
  • Áudio (.wav, .mp3 e .mp4)

You can use this same process to accept CSV file uploads in WordPress.

But for WordPress security reasons, some files can’t be uploaded. For example, you can upload images to WordPress, but you might find that some smartphone formats are blocked.

If you run into that problem, here’s how to allow additional file upload types to your forms. And here’s a more specific guide to allow Adobe Illustrator file uploads.

Next, Take Payment in Your WordPress Forms

There you have it! You now know how to create a WordPress form with multiple file uploads. You can also add a payment field and require payment with your file uploads.

And if you enjoyed this article, you might also want to look at some cool contact page design examples.

Pronto para criar seu formulário? Comece hoje mesmo com o plugin de criação de formulários WordPress mais fácil. WPForms Pro inclui muitos modelos gratuitos e oferece uma garantia de devolução do dinheiro em 14 dias.

Se este artigo ajudou você, por favor, siga-nos no Facebook e Twitter para mais tutoriais e guias gratuitos do WordPress.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que se você clicar em alguns de nossos links, poderemos ganhar uma comissão. Veja como o WPForms é financiado, por que isso importa e como você pode nos apoiar.

Kacie Cooper

Kacie escreve para o blog e supervisiona o boletim informativo semanal no WPForms, além de ter um carinho especial por criar modelos de formulários divertidos. Ela escreve em blogs sobre WordPress e sobre ele desde 2016. Saiba Mais

O Melhor Plugin Construtor de Formulários de Arrastar e Soltar para WordPress

Fácil, Rápido e Seguro. Junte-se a mais de 6 milhões de proprietários de sites que confiam no WPForms.

2 comments on “How to Create a WordPress Form with Multiple File Uploads

  1. Really like this. I am re-designing a food site and want users to share their dishes. How easy is it for the user to upload images from mobile? Thank you

    1. Hey Rick! It wouldn’t be difficult at all! Generally your users will be able to click on the file upload field, which would bring up the camera or files options (from which they make their selection), submit the form, and voila!

      Espero que isso ajude a esclarecer 🙂 Se você tiver mais alguma dúvida sobre isso, por favor entre em contato conosco se tiver uma assinatura ativa. Se não tiver, não hesite em nos fazer algumas perguntas em nossos fóruns de suporte.

Adicionar um comentário

Ficamos felizes que você tenha escolhido deixar um comentário. Por favor, tenha em mente que todos os comentários são moderados de acordo com nossa política de privacidade, e todos os links são nofollow. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.

Este formulário é protegido pelo Cloudflare Turnstile e aplicam-se a Política de Privacidade e Termos de Serviço da Cloudflare.