This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

using machform to send attachment files in emails


  1. leaperm67
    Member

    Hi, I am looking to create a form that i can use to send an email with various fields of info and that will also allow me to attach a image/s (Maybe upto 5 images) file from the users pc and send it in an email to me. Can machform do this?

    Posted 15 years ago #
  2. yuniar

    Hello, MachForm won't send the file as attachment, instead a link to download your file will be sent.

    So your users will be able to upload the images and you will get the email which contain download link to all those files. Clicking the link will download the file immediately (similar as attachment).


    MachForm Founder

    Posted 15 years ago #
  3. pamin002
    Member

    Hi,

    When the attachment link is opened in the auto-generated email, it always asked for a user to login in. I have a form that is set up to email a certain individual with all of the info (name, email, and file uploaded). I do not want to give them my admin login info for machform. is there a way to disable the login feature so that the individual can bypass the login prompt and just download the file?

    Posted 15 years ago #
  4. yuniar

    Yes, edit your "download.php" search around line 13 for this code:

    require('includes/check-session.php');

    remove that code.


    MachForm Founder

    Posted 15 years ago #
  5. moshin
    Member

    Yuniar,
    Is there a workaround to make this available for some forms only? (I don't want the bypass on all forms)

    Thanks

    Posted 14 years ago #
  6. yuniar

    Yes, you can add some conditional code to make this available for some forms only.
    First, make sure to remove the above code.

    Then around line 22 search for this code:

    $form_id 	= $params['form_id'];
    $id      	= $params['id'];
    $field_name = $params['el'];

    below those lines add this code:

    if(!in_array($form_id,array(6,7,8)){
       require('includes/check-session.php');
    }

    that would set the hack to be applied for forms with id numbers 6 or 7 or 8 only.
    Adjust those id numbers with your own form id numbers.
    `


    MachForm Founder

    Posted 14 years ago #

RSS feed for this topic

Reply