download file from a subform

download file from a subform

Postby johan » Thu Aug 31, 2017 11:41 pm

Hi

I've created a form in Nubuilder with a subform where I upload my files (blob).
This works fine but how can I download the files from database? I've tried to add a button in the subform with event onclick but nothing happens.
Any idea or is there an example in demo of Nubuilder?
Code: Select all
$s = "
SELECT

sfi_type AS file_type,
sfi_description AS file_name,
sfi_blob AS file_blob
FROM dropzonetable
WHERE zzzsys_file_id = '#SUBFORM_RECORD_ID#'

";

nuDownloadFile('', $s);
johan
 
Posts: 227
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: download file from a subform

Postby mobilemcclintic » Fri Sep 01, 2017 9:18 am

Just an assumption,
but did you use onclick to run nuRunPHP(pCode) and a related PHP procedure?

The display object for showing pictures on the online demo calls a PHP code to run the query.

look at demo.nubuilder.net and check out the product/services form.
mobilemcclintic
 
Posts: 53
Joined: Fri Oct 23, 2015 8:04 am

Re: download file from a subform

Postby johan » Fri Sep 01, 2017 4:04 pm

Hi
Every form can have more attachments (files). In the example the picture is on the form, not the subform.
I need a subform with on every row the name of the document and a button to download that attachement.

bijlage.PNG
bijlage.PNG (5.87 KiB) Viewed 129 times


Johan
johan
 
Posts: 227
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium


Return to Custom Code