Results 1 to 3 of 3

Thread: Submit button directly downloads something?

  1. #1
    New user
    Join Date
    11-20-15.
    Posts
    2

    Frage Submit button directly downloads something?

    Hello!

    I would like to know if it's possible to set up a submit button which directly downloads something instead of linking to another page and download it from there.

    In other words here the scenario:

    I want the visitor to leave his contact data (on a form) before s/he is able to download my file (a software).

    I was thinking about either a direct download or a link to a "downloadpage" which automatically starts the download (preferably the first solution though), could anybody provide a guide to something like this? I'm a total noob in Contao
    Last edited by offline; 11/20/2015 at 11:13.

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    I can think of two ways. The proper way is to simply implement a processFormData Hook. In this hook you either let the file be streamed to the client via PHP your you simply create a redirect to the file.

    The other way would be to do the same, but in your own script in your /templates folder, which you will then include via {{file::*.php}} on the target page.

  3. #3
    New user
    Join Date
    11-20-15.
    Posts
    2

    Default

    Quote Originally Posted by Spooky View Post
    I can think of two ways. The proper way is to simply implement a processFormData Hook. In this hook you either let the file be streamed to the client via PHP your you simply create a redirect to the file.

    The other way would be to do the same, but in your own script in your /templates folder, which you will then include via {{file::*.php}} on the target page.
    Got it to work thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •