The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Need help w/registration form to d/l files - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Need help w/registration form to d/l files (/showthread.php?tid=669)



Need help w/registration form to d/l files - buckeyeaz - Apr 23rd, 2010

Hello -

I am a newbie to FT, and php, and am looking for guidance (or help) with creating a form and additional functionality.

My client wants his site visitors to register before downloading files. The visitor sees a list of document links in a page, clicks on the wanted document link and is taken to a registration form. After submitting the form, the 'thank you' page includes a link to download the wanted file.

Is this functionality available in FT? Or can anyone direct me to further information to be found on the internet on how to configure this?

Any help would be greatly appreciated.


RE: Need help w/registration form to d/l files - Ben - Apr 24th, 2010

Hi buckeyeaz,

Sure, no problem! This is certainly do-able, but it would take a little configuration.

Here's how I picture it working.

1. On the page that lists the documents, each link would be the same, only passing the name of the document to the form. Something like this:

Code:
<ul>
  <li><a href="form.php?doc=doc1">Document 1</a></li>
  <li><a href="form.php?doc=doc2">Document 2</a></li>
  <li><a href="form.php?doc=doc3">Document 3</a></li>
</ul>

2. Next, on the form page (form.php), you'd store that information in a hidden field to be passed along with the form submission.

Code:
<input type="hidden" name="document" value="<?php echo $_GET["doc"]" />

3. Assuming this is a POST form - not hooked up with the Form Tools API - you'd configure Form Tools to pass along the document value to the thank you page (this is actually really easy - this tutorial explains something very similar).

4. Lastly, on the thankyou page, figure out which document is passed viat the query string and display the appropriate (real) link to the file. This is kind of explained in the previous tutorial.

Hope this helps!

- Ben


RE: Need help w/registration form to d/l files - buckeyeaz - May 5th, 2010

Hi Ben -

Wow. That looks pretty easy. I really appreciate your response and information.

Now I just have to convince the client to activate mysql on their website. (See what happens when you assume...?)

Thank you!!

(Apr 24th, 2010, 8:54 AM)Ben Wrote: Hi buckeyeaz,

Sure, no problem! This is certainly do-able, but it would take a little configuration.

Here's how I picture it working.

1. On the page that lists the documents, each link would be the same, only passing the name of the document to the form. Something like this:

Code:
<ul>
  <li><a href="form.php?doc=doc1">Document 1</a></li>
  <li><a href="form.php?doc=doc2">Document 2</a></li>
  <li><a href="form.php?doc=doc3">Document 3</a></li>
</ul>

2. Next, on the form page (form.php), you'd store that information in a hidden field to be passed along with the form submission.

Code:
<input type="hidden" name="document" value="<?php echo $_GET["doc"]" />

3. Assuming this is a POST form - not hooked up with the Form Tools API - you'd configure Form Tools to pass along the document value to the thank you page (this is actually really easy - this tutorial explains something very similar).

4. Lastly, on the thankyou page, figure out which document is passed viat the query string and display the appropriate (real) link to the file. This is kind of explained in the previous tutorial.

Hope this helps!

- Ben



RE: Need help w/registration form to d/l files - Ben - May 8th, 2010

Haha :-) Good luck with that!

- Ben