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: 251
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: 54
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 1180 times


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

Re: download file from a subform

Postby johan » Wed Mar 21, 2018 11:38 pm

Hi
I'm still searching for a solution on this.
I have a subform with a file in every row of the subform. Just don't know how to download the files again, using a button.

Thanks for your support.
Johan
johan
 
Posts: 251
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: download file from a subform

Postby toms » Thu Mar 22, 2018 1:49 am

You'd better ask your questions in the v4 Forum. V3 ist not supported anymore.
toms
 

Re: download file from a subform

Postby johan » Thu Mar 22, 2018 3:09 am

ok but this is a V3 issue.
I'm almost there. Only '#SUBFORM_RECORD_ID#' is not working in sql / php
johan
 
Posts: 251
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: download file from a subform

Postby keshymarkyz » Wed Dec 12, 2018 6:40 pm

johan wrote:Hi
I'm still searching for a solution on this.
I have a subform with a file in every row of the subform. Just don't know how to download the files again, using a button. https://www.giannasgrille.com/phenq-review/

Thanks for your support.
Johan



This was the kind because of that button to losing up and making the form right
keshymarkyz
 
Posts: 4
Joined: Wed Apr 11, 2018 11:08 pm


Return to Custom Code



cron