views:

34

answers:

1

Hi,

I'm trying to add a page to my Magento site which contains an enquiry form. User would fill out name, email, tel no and add a file attachment. The store owner would then get the email with the uploaded file as an attachment.

I'm a Magento newbie and the client I'm doing this for is reluctant to pay for an extension.

My understanding so far is that I cant just use a standard php email script as I will have permissions issues regarding the file upload. I've been working on the idea of using the /media/ folder to upload the file.

Any help would be greatly appreciated.

Thanks, Steve

A: 

Create a new CMS page and paste in the following code:

{{block type="core/template" template="contacts/form.phtml"}}
<script type="text/javascript">
elem = $("contactForm");
elem.writeAttribute('action', '/contacts/index/post');
</script>

The javascript is required to make sure that the form posts to the correct location now that you have it in a CMS context.

Cheers, JD

Jonathan Day