Forums

How do you attache a file to an email in the form

AprilFloyd 11 Sep, 2007
Do you use the file uploads feature? I have tried this but how do i get the file to attache to the email.

Can someone explain how this part works.
GreyHead 11 Sep, 2007
Hi AprilFloyd,

Please try this FAQ and see if that helps. Do come back and ask any more questions.

Bob
AprilFloyd 11 Sep, 2007
Hi,

Thanks for the quick reply, I have tried that and I still don't get the attachment.
GreyHead 11 Sep, 2007
Hi AprilFloyd,

I need more information from you to help any more. Please either (a) post a backup of your form (or email it to me at info at greyhead.net) or (b) put the code of your formand an image of your General tab here.

Bob

PS today you'll get a quicker response with (b) as I have yet to reinstall all my php stuff on this computer.
AprilFloyd 11 Sep, 2007
<table width="400" border="0">
  <tr>
    <td>Name</td>
    <td><input name="name" type="text" size="30" maxlength="30"></td>
  </tr>
  <tr>
    <td>E-mail Address </td>
    <td><input name="email" type="text" size="30" maxlength="30"></td>
  </tr>
  <tr>
    <td>Course</td>
    <td><input name="course" type="text" id="course" size="30" maxlength="30"></td>
  </tr>
  <tr>
    <td>Campus</td>
    <td><select name="campus">
        <option value="Forth Valley College">Forth Valley College</option>
        <option value="Stirling University">Stirling University</option>
      </select>    </td>
  </tr>
  <tr>
    <td>Date of Birth </td>
    <td><input name="dob" type="text" id="dob" size="30" maxlength="30"></td>
  </tr>
  <tr>
    <td>Sex</td>
    <td><select name="sex" id="sex">
      <option value="Female">Female  </option>
      <option value="Male">Male  </option>
    </select></td>
  </tr>
  <tr>
    <td>Phone</td>
    <td><input name="phone" type="text" id="phone" size="30" maxlength="30"></td>
  </tr>
  <tr>
    <td>Upload picture </td>
    <td><input type="file" name="file"></td>
  </tr>
  <tr>
    <td><span class="style1">Help prevent spam by entering the verification code </span></td>
    <td>{imageverification}</td>
  </tr>
  <tr>
    <td> </td>
    <td><input type="submit" name="Submit" value="send"></td>
  </tr>
</table>
GreyHead 11 Sep, 2007
Hi AprilFloyd,

The html looks OK (though you'll need to remove the spaces from some of the field names).

In the General Tab you'll need to add a 'From Name' - anything will do - as I think the Joomla mailer validates the field.

If that doens' fix it, please post an image of your File Uploads tab (I forgot to ask for that before, sorry).

Bob
AprilFloyd 11 Sep, 2007
<br><br>Post edited by: AprilFloyd, at: 2007/09/16 13:38
GreyHead 11 Sep, 2007
Hi AprilFloyd,

That looks good too. Scratches head . . .

The spaces are in the option values
<select name="campus">
  <option value="Forth Valley College">Forth Valley College</option>
  <option value="Stirling University">Stirling University</option>
</select>
I think those will give ChronoForms problems (but maybe not) shouldn't make any difference to file upload though.

I've no more idea about the file attachments - is the web page public? Can I get to it to have a look?

Bob
AprilFloyd 12 Sep, 2007
<br><br>Post edited by: AprilFloyd, at: 2007/09/16 13:39
GreyHead 12 Sep, 2007
Hi AprilFloyd,

Sorry, faded memory, I had to reinstall my PHP software and go to look at the files.

ChronoForms uploads files to $mosConfig_absolute_path.'/components/com_chronocontact/upload/ as far as I can see it does nothing else with them so they won't be attached to an email.

Bob
AprilFloyd 12 Sep, 2007
I don't have that directory. I assume I need to create it.
My test forms have not uploaded any images.
GreyHead 12 Sep, 2007
Hi AprilFloyd,

I checked my old test site and it has that folder but I don't now remember if I had to create it but I'd guess so.

In haste,

Bob
Max_admin 12 Sep, 2007
Hi AprilFloyd,

You should have this path after you successfully install ChronoForms :
components/com_chronocontact/upload/index.html

this is created directly once you install ChronoForms, if this directory isnt there then there may be a problem with your installation!!

do you have joomla 1 or 1.5 ?

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AprilFloyd 13 Sep, 2007
<br><br>Post edited by: AprilFloyd, at: 2007/09/16 13:39
AprilFloyd 13 Sep, 2007
<br><br>Post edited by: AprilFloyd, at: 2007/09/16 13:40
Max_admin 13 Sep, 2007
Great, please export your form and email me the .cfba file to webmaster 'at' chronoengine.com and i will test this🙂

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AprilFloyd 13 Sep, 2007
<br><br>Post edited by: AprilFloyd, at: 2007/09/16 13:39
Max_admin 13 Sep, 2007
Hi AprilFloyd,

No, actually since we added this feature, files gets uploaded to this dir and attached to email too, we may add more config for this later though.

Just one thought, try to give this folder a permission of 755 instead of 777 and see if this works, its better so nobody gets in and try to get your uploaded files or delete it, or you should regularly do this yourself🙂

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.