Drupal 7 form submit download file






















In the submit function I am generating csv file and saving it to the files folder using fputcsv function. But Now I need extra functionality of submit. After saving the file it should download the file also. Attach a form submit handler code here: Drupal 7 custom form submit handler is not being called. In the following code I am downloading file as attachment created with phpExcel. It may help someone. Sign up to join this community. The best answers are voted up and rise to the top.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 7 years, 9 months ago. Active 2 years ago. Viewed 4k times. How to do this? Any one have some idea about this? Improve this question. Ahmad Ahmad 2, 3 3 gold badges 28 28 silver badges 70 70 bronze badges. Add a comment. Active Oldest Votes. The file download should begin when submitted.

Improve this answer. Community Bot 1. To make the form as pop up, make the form available as block under form settings and put the form block in any jQuery plugin like thickbox. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to create file download popup form in drupal7 Ask Question.

Asked 8 years, 6 months ago. Active 7 years, 10 months ago. Viewed 3k times. Ben10 Ben10 3, 2 2 gold badges 31 31 silver badges 59 59 bronze badges. Add a comment. Active Oldest Votes. Community Bot 1 1 1 silver badge. Sethu Lakshmy Sethu Lakshmy 74 5 5 bronze badges. Interested in same thing as you Bharanikumar, also I need to add the file from admin, do you know any way of doing that? Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.

Post as a guest Name. Email Required, but never shown.



0コメント

  • 1000 / 1000