0

Hello Im not sure if this can be done, but Im trying to make a simple app where you create your own lexical analyzer.

So in the webform I ask the necessary information, then I need the following:

  1. After send the webform generate a script file (from a template I already have done)

  2. I need a way to replace some tokens in the script file with data from the submitted webform

  3. Let the user download the generated script file

Any idea how to achieve this? maybe it is not that complex...

Thank you very much

0

You need hook_webform_submission_insert for that purpose.

0

This module may be used for your idea please use and try this module

Webform2PDF

The Webform2PDF Drupal module is an extension of the Webform module. It can be used to generate PDF document from the results of a form. The generated PDF document can be attached to the form summary e-mail sent by Webform module, or it can be downloaded from the /Results/ page. Different PDF templates can be set for each form. The templates can be formatted with HTML tags, and they can be edited with WYSIWYG Drupal module, making the template creation easy and the templates highly customizable. The output documents will be created by using these templates.

  • Hello but generate a pdf is not what I need I need to generate a javascript file... maybe you missunderstood my question... – SsouLlesS May 7 '14 at 5:46
0

I found the trick in this post =)

https://www.drupal.org/node/1345212

You can create any kind of generated file with any kind of extension. Not only pdf

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.