Is this even possible?

I’m new to Scriptcase and PHP. So I don’t even know if this is possible. I’m hoping someone in the forum can either help me figure this out or just tell it’s not possible so I can go a different route.

I have a form with numerous panels on it. One of the panels needs to contain links to documents that have been uploaded. There will only ever be 2 documents listed and they both are document filename types on table. The upload works perfectly. However, I need a few only version of the form where someone can only click on the link to download the document and not see the ‘choose file’ or ‘delete’ options. Ideally I just want 2 links there with the file type graphic if possible.

So, is it possible in Scriptcase to somehow hide those parts of the control OR just put 2 document links into the panel? I’ve received several suggestions of using a grid but it doesn’t work well in this form. I just need to links. That’s all. And if the solution is hacking the generated PHP to remove the ‘chose file’ and ‘delete’ pieces I’m totally fine with that. I’ve included a screen shot of this section of the form so you can see what I’m trying to do layout wise.

Thanks!

Ted

DocumentsLayout.jpg

One option might be to use a grid. As this integrates badly in your panels you could consider using containers. Of course you can always create a label field and add your own html to it allowing the user to download. You only have to apply the correct location of the file.

Thanks Albert. I think the label field with my own HTML is a great idea. If my filename was stored in a fields called ucdocument and the subfolder it was in was based on a field on the same record called id, how what would the HTML look like? Lets say I wanted it to say “Click here to download UCC docment”. I feel like I should pay you for all the help you have given me thus far. I greatly appreciate your input and suggestions. Thanks Ted

Well you have your upload location set to a certain spot (deploy advanced than you are in control). The filename is stored in the database so the full path would be:

$fullpath=$mydefaultdownloadfolder.’/’.{filename};

then for download you can just use a hyperlink to that

<a href = “$fullpath”>Click here…</a>

Another way is that you use a blank application to control the html header for download.
Of course you need to set the $mydefaultdownloadfolder to the right download path yourself, although there must be some default global var for that.

Thanks Albert. I’ll give that a try right now! As always I really do appreciate your timely responses.

Ted