Forums

Uploaded file linked in tab

acol76 14 Nov, 2008
Hi,
I'm a newbie in using your wonderful chronoform component and I know nothing about programming or db...
I wish i had some help from you to make this:
I need the uploaded file name in the db table to be linked to the file itself, or at least showing the complete path, instead of just the name of the file. Is that possible?
And can I do the same with a table value showing an email address?

Thank you by now for your help!

🙂
Max_admin 14 Nov, 2008
Hi acol76,

tell me your file upload field name and I can show you how to do this!

I can't understand the email question!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
acol76 18 Nov, 2008
Thank you so much for answering so fastly.

The field name is file_1.

Regarding the email question: i mean if there's a way to make "mailto" linked email addresses in another field, named text_14, in which submitters insert their email address.

Thanks again!
Max_admin 18 Nov, 2008
Hi, add this to the onsubmit before email box :


JRequest::setVar('file_1', 'http://ww.mydomain.com/components/com_chronocontact/uploads/form_name/'.JRequest::getVar('file_1'));



regarding the email, you eman you need to send teh user a copy ?

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
acol76 20 Nov, 2008
I mean that in the data table in the back end, i need the emails inserted to be clickable and open a mail client window to contact that email directly.

I hope i explained my need better... sorry!

Thank you
GreyHead 20 Nov, 2008
Hi acol76,

Sure, in the OnSubmit After box add something like:
<?php
$email = JRequest::getString('some_field', '', 'post');
JRequest::setVar('text_14', "<a href='mailto:$email'>$email</a>", 'post');
?>

Bob
acol76 20 Nov, 2008
Hi guys, i solved the quest with the email!!

But not the first quest!
I meant to have the file name linked to itself (or showing its path at least), in the data table of the form, in the back end; as you suggested, i inserted this code in the onsubmit - before sending email box:

JRequest::setVar('file_1', 'http://www.mydomain.com/components/com_chronocontact/uploads/my_form_name/'.JRequest::getVar('file_1'));

but all i get is the same code shown in the front end, after form submission.

Where do I go wrong? Maybe some code missing?

Best regards

Acol
acol76 20 Nov, 2008
OK OK oK!

Solved cloning the code syntax of the email quest!

Thank you again!!

Acol
GreyHead 20 Nov, 2008
Hi acol76,

Excellent !! well done - I thought that might be the answer but I wasn't sure.

Bob
This topic is locked and no more replies can be posted.