V
V
Vitaly2020-10-19 00:20:05
CMS
Vitaly, 2020-10-19 00:20:05

How to send video via form/ajaxform?

There is a need to send photo / video content through the form.
Everything is ok with the photo, but not with the video. If there is only a photo in the selection, the letter is successfully sent and received, in the case of a video, the letter is successfully sent, but does not come to the mail.

I'm using formit + ajaxform Thanks

in advance for your help.

Form call code:



The form itself:
<form action="#" method="post" class="ajax_form" id="reviewAjaxForm" enctype="multipart/form-data">
  <div class="add_add-rating">
      <span>
          Оцените товар:
      </span>
      <div class="add_add-rating-imgs">
          <img src="/assets/imgs/icons/products/star.svg" class="rating-star" alt="" data-rating="1">
          <img src="/assets/imgs/icons/products/star.svg" class="rating-star" alt="" data-rating="2">
          <img src="/assets/imgs/icons/products/star.svg" class="rating-star" alt="" data-rating="3">
          <img src="/assets/imgs/icons/products/star.svg" class="rating-star" alt="" data-rating="4">
          <img src="/assets/imgs/icons/products/star.svg" class="rating-star" alt="" data-rating="5">
      </div>
  </div>
    
  <div class="installement-form-inputs">
  <input type="text" placeholder="ФИО" name="name">
  <input type="email" placeholder="Email" name="email">
  <textarea name="advantages" placeholder="Преимущества"></textarea>
  <textarea name="disadvantages" placeholder="Недостатки"></textarea>
  <textarea name="description" placeholder="Описание"></textarea>
  <div class="input">
    <a href="#" id="add_image_button">
    Загрузите фото/видео
    </a>
  </div>
  
  <input type="file" placeholder="Картинка" id="add_image" name="files[]" multiple hidden>
  <input type="hidden" id="rating" name="rating">
  </div>
  
  <input type="hidden" name="review_product_id" value="">
  <input type="hidden" name="review_product_name" value="">
  
  <button type="submit" name="do_installement" class="outline-button">
  Оставить отзыв о товаре
  </button>
</form>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question