1

I'm building a site that is going to offer some free PDF downloads (reports, guides etc.) but the client would like to collect the users email in return for the download.

Any thoughts on the best way to do this using ExpressionEngine?

As always, all help will be appreciated.

2
  • I've got a couple ideas, but just wanted to ask how secure you're hoping the download would be before I propose something? Basically a question of security by obscurity or something more? Oct 1 '13 at 12:51
  • Good question. Security isn't a massive concern, these are only marketing tools that we're giving away, nothing more. Oct 1 '13 at 13:24
2

I think your best bet would be to use Solspace Freeform then. The free version will work just fine.

Setup your form as normal using the {exp:freeform:form} tag. And set the return parameter to include the form entry ID, like this: return="template_group/template/%%entry_id%%"

Then on your return template, use the {exp:freeform:entries} tag, passing the entry ID from the URL into the entry_id parameter entry_id="{segment_3}".

Within the entries tag pair, you can use the no results variable pair to handle if the entry ID is invalid. {if freeform:no_results}Sorry, no results were found.{/if}

After that, it's just a matter of putting whatever HTML you want to show your download to the user.

2
  • That's really helpful, thanks! I'll give that a try. Oct 1 '13 at 14:53
  • That worked really well, thanks @JeremyGimbel Oct 16 '13 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.