PHP Classes

Suggestion

Recommend this page to a friend!

      PHP JSON Form Builder  >  All threads  >  Suggestion  >  (Un) Subscribe thread alerts  
Subject:Suggestion
Summary:Problem with input type="file"
Messages:2
Author:Marco
Date:2020-05-17 15:11:29
 

  1. Suggestion   Reply   Report abuse  
Picture of Marco Marco - 2020-05-17 15:11:29
Hello Arash,
you MUST add enctype="multipart/form-data" to send a file via internet, in function render() of your (very useful!) class ;)

$this->html = "<form name=\"{$data['name']}\" method=\"{$data['method']}\" action=\"{$data['action']}\" enctype=\"multipart/form-data\">";

Ciao, Marco

  2. Re: Suggestion   Reply   Report abuse  
Picture of Arash Soleimani Arash Soleimani - 2020-05-17 17:58:00 - In reply to message 1 from Marco
Hi Marco,

Thank you for using my class and your great suggestion.

I updated the class. Now you can use enctype, target, and autocomplete attributes in the form tag.

If you need anything else, let me know ;)