Contact email form with upload file...

User 2361117 Photo


Registered User
115 posts

I am using HTML Editor paid version 16.1, build 808 to modify a one-page responsive website template to serve my needs. Although I have had to jump through a number of hoops to get everything to work as intended, I have one last task to complete and that is: add an upload file provision to the template's built-in contact email form. While I have been able to successfully add two fields (source, URL) to the built-in contact email form, with exception of adding the HTML to the form (refer to file attachment), modification to the contact email form's PHP files (refer to PHP file attachments) appears to be much more involved whereby I have been unable to find a barebones PHP code I can add to the existing PHP to make this work. I should also add that while I am well versed in HTML, CSS, and Javascript, I am virtually lost when it comes to PHP. Point is, I would prefer not to replace the built-in contact form with different HTML and PHP for adding a contact form email file attachment. Any suggestions regarding this subject matter are appreciated.
User 2361117 Photo


Registered User
115 posts

Sorry, but for whatever reason, my initial post would not allow me to post the HTML and PHP files referred to therein.
User 122279 Photo


Senior Advisor
14,567 posts

If you are using Dropbox, you could zip the files and pop them in there and give us a link.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 187934 Photo


Senior Advisor
20,245 posts

boilermaker73 wrote:
Sorry, but for whatever reason, my initial post would not allow me to post the HTML and PHP files referred to therein.

Zip them up.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2361117 Photo


Registered User
115 posts

Zip file containing the one-page HTML (index.html) with built-in contact form and PHP files (php-email-form.php and contact.php). Just to let everyone know, I intend to remove the 'source' and 'url' fields where they appear in both the HTML and PHP files as they are longer required. This essentially leaves fields (name, email, subject, message, and file). Thank you ahead of time.
Attachments:
User 187934 Photo


Senior Advisor
20,245 posts

Do you want to restrict the file type?
Are you going to use the Ajax to submit the form?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2361117 Photo


Registered User
115 posts

In answer to your question, yes, I definitely want to restrict the file type to PDF. Fortunately, the online vendor from whom I purchased the responsive website template just informed me via email today that they have recently updated and released a new version of their template along with the associated PHP files to accommodate adding a file to the built-in contact form. Needless to say, this is exactly what I had hoped for and couldn't have come at a more opportune time. The only thing I have to wait for at the moment is the forthcoming updated online instruction regarding the exact code that needs to be added to the PHP files to send a file attachment. Thank you for the response.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.