PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Customize form output and attach it to email?

  1. grantsdale
    Member

    I have a form I'm looking to convert from ASP. I have a very specific way it needs to be done.
    The output has to follow a certain format such as:

    FIELD1=[output1]
    FIELD2=[output2]
    FIELD3=[output3]
    FIELD4=[output4]
    FIELD5=[output5]

    The field names are NOT the same as the labels. If I have to put them in manually, thats not a big deal. I just need to be able to call the outputs manually and pull those in,

    Also, it needs to be attached as a .txt to the email. It can be in the body of the email as well, but it needs to be an attachment.

    Are both of these possible with GravityForms?

    Posted 12 years ago on Thursday July 5, 2012 | Permalink
  2. This is possible without a problem.

    Is this the email for the visitor who filled out the form, or the admin notification email?

    If it's for the user, you would use the gform_user_notification_attachments filter:
    http://www.gravityhelp.com/documentation/page/Gform_user_notification_attachments

    If it's for the admin, use the gform_admin_notification_attachments filter:
    http://www.gravityhelp.com/documentation/page/Gform_admin_notification_attachments

    Both those filters are designed to add an attachment which is a file stored on your server (think product brochure or catalog or something.) You will first have to write the text file on the server, save that name and file location, then use one of these filters to attach the file you created. It will be easy to get the submitted values using built in functionality.

    It's certainly possible and we can help you with the actual code once you purchase Gravity Forms.

    Posted 12 years ago on Friday July 6, 2012 | Permalink