Hi Everyone. Hopefully this wasn't covered elsewhere. I did a search and couldn't find anything. I am using the latest version of ChronoForms for Joomla 1.5. I am creating an online job application with an option to upload a resume. Everything is working fine except I would like for a link to the uploaded file to appear on the data table. As it is now, nothing shows up on the table under resume. Hopefully I am explaining this correctly. Any help would be appreciated.
Thanks
Thanks
Thank you for your quick response. I have looked through the conversation that you sent me to but was unable to find what I need to do to have a link to the uploaded file listed in the table. The email attachments are sending find, and I have fixed the redirect error, but I am unable to get anything to show up on the table.
Hi jberryhill,
In the Autogenerated tab for your form try replacing
What do you see with DeBug on?
Bob
In the Autogenerated tab for your form try replacing
$_POST['file_name']
with$_FILES[$allowed_s2[0]]['name']
it may vary depending on your Joomla version.
What do you see with DeBug on?
Bob
I have looked through the Autogenerated tab coding and i don't have the $_post tag to replace. I just have an entry for each of my form area names:
('resume','', 'post', 'string', '' )."');" );
I forgot to mention, the upload section doesnt show up in the debug section in the "_POST: Array" section.
Hi jberryhill,
In full that's like:
Bob
In full that's like:
'".JRequest::getVar('resume','', 'post', 'string', '' )."' ,
so you are using Joomla 1.5, in which case the code is different. Try replacing the whole of that statement with'".$_FILES[$allowed_s2[0]]['name']."' ,
If that doesn't work I shall need to go and search some more.
Bob
I made the change and it didn't work. I tinkered around with it for a bit and haven't gotten it functioning. When I made the change, the email attachments still worked but chronoforms completely stopped saving data to the table. I appreciate your help!
Hi jberryhill,
Most likey you have a small typo on the page. If you post it here between [code] tags I'll take a look.
Bob
Most likey you have a small typo on the page. If you post it here between [code] tags I'll take a look.
Bob
Autogenerated Coding:
Maybe it should look different because its the last form object?
<?php
$database =& JFactory::getDBO();
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16);
$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES (
'' ,
'".$inum."','". date('Y-m-d')." - ".date("H:i:s")."',
'".$_SERVER['REMOTE_ADDR']."' ,
'".JRequest::getVar('position','', 'post', 'string', '' )."' ,
'".JRequest::getVar('learnaboutus','', 'post', 'string', '' )."' ,
'".JRequest::getVar('learnaboutusother','', 'post', 'string', '' )."' ,
'".JRequest::getVar('fname','', 'post', 'string', '' )."' ,
'".JRequest::getVar('lname','', 'post', 'string', '' )."' ,
'".JRequest::getVar('email','', 'post', 'string', '' )."' ,
'".JRequest::getVar('mname','', 'post', 'string', '' )."' ,
'".JRequest::getVar('address','', 'post', 'string', '' )."' ,
'".JRequest::getVar('city','', 'post', 'string', '' )."' ,
'".JRequest::getVar('state','', 'post', 'string', '' )."' ,
'".JRequest::getVar('zip','', 'post', 'string', '' )."' ,
'".JRequest::getVar('phone','', 'post', 'string', '' )."' ,
'".JRequest::getVar('ccn','', 'post', 'string', '' )."' ,
'".JRequest::getVar('appliedbefore','', 'post', 'string', '' )."' ,
'".JRequest::getVar('poofofeligibility','', 'post', 'string', '' )."' ,
'".JRequest::getVar('previouslyapplieddate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employedbefore','', 'post', 'string', '' )."' ,
'".JRequest::getVar('previouslyemployeddate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('friendsrelativesworkhere','', 'post', 'string', '' )."' ,
'".JRequest::getVar('currentlyemployed','', 'post', 'string', '' )."' ,
'".JRequest::getVar('preventedlawfullyemployed','', 'post', 'string', '' )."' ,
'".JRequest::getVar('proofofcitizenshipimmigration','', 'post', 'string', '' )."' ,
'".JRequest::getVar('dateavailable','', 'post', 'string', '' )."' ,
'".JRequest::getVar('abletowork','', 'post', 'string', '' )."' ,
'".JRequest::getVar('subjecttorecall','', 'post', 'string', '' )."' ,
'".JRequest::getVar('abletotravel','', 'post', 'string', '' )."' ,
'".JRequest::getVar('elementaryname','', 'post', 'string', '' )."' ,
'".JRequest::getVar('elementaryaddress','', 'post', 'string', '' )."' ,
'".JRequest::getVar('elemtaryyears','', 'post', 'string', '' )."' ,
'".JRequest::getVar('highschoolname','', 'post', 'string', '' )."' ,
'".JRequest::getVar('highschooladdress','', 'post', 'string', '' )."' ,
'".JRequest::getVar('highschoolyears','', 'post', 'string', '' )."' ,
'".JRequest::getVar('undergradname','', 'post', 'string', '' )."' ,
'".JRequest::getVar('undergradaddress','', 'post', 'string', '' )."' ,
'".JRequest::getVar('undergradmajor','', 'post', 'string', '' )."' ,
'".JRequest::getVar('undergradyears','', 'post', 'string', '' )."' ,
'".JRequest::getVar('undergraddegree','', 'post', 'string', '' )."' ,
'".JRequest::getVar('gradname','', 'post', 'string', '' )."' ,
'".JRequest::getVar('gradaddress','', 'post', 'string', '' )."' ,
'".JRequest::getVar('gradmajor','', 'post', 'string', '' )."' ,
'".JRequest::getVar('gradyears','', 'post', 'string', '' )."' ,
'".JRequest::getVar('graddegree','', 'post', 'string', '' )."' ,
'".JRequest::getVar('othereducationname','', 'post', 'string', '' )."' ,
'".JRequest::getVar('othereducationaddress','', 'post', 'string', '' )."' ,
'".JRequest::getVar('othereducationcourseofstudy','', 'post', 'string', '' )."' ,
'".JRequest::getVar('othereducationyears','', 'post', 'string', '' )."' ,
'".JRequest::getVar('othereducationdegree','', 'post', 'string', '' )."' ,
'".JRequest::getVar('othereducationadditionalcomments','', 'post', 'string', '' )."' ,
'".JRequest::getVar('extras','', 'post', 'string', '' )."' ,
'".JRequest::getVar('military','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1address','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1phone','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1jobtitle','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1supervisor','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1startdate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1enddate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1startingsalary','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1finalsalary','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment1workperformed','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2address','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2phone','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2jobtitle','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2supervisor','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2startdate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2enddate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2startingsalary','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2finalsalary','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment2workperformed','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employmen31','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3address','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3phone','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3jobtitle','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3supervisor','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3startdate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3enddate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3startingsalary','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3finalsalary','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment3workperformed','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4address','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4phone','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4jobtitle','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4supervisor','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4startdate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4enddate','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4startingsalary','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4finalsalary','', 'post', 'string', '' )."' ,
'".JRequest::getVar('employment4workperformed','', 'post', 'string', '' )."' ,
'".JRequest::getVar('activitiesandoffices','', 'post', 'string', '' )."' ,
'".JRequest::getVar('summarizedjobskills','', 'post', 'string', '' )."' ,
'".JRequest::getVar('additionalinfo','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference1name','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference1phone','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference1address','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference1relationship','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference2name','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference2phone','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference2address','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference2relationship','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference3name','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference3phone','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference3address','', 'post', 'string', '' )."' ,
'".JRequest::getVar('reference3relationship','', 'post', 'string', '' )."' , '"
'".$_FILES[$allowed_s2[0]]['name']."' ,
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
Maybe it should look different because its the last form object?
Hi jberryhill,
Try this in place of the last two lines of the SQL:
Try this in place of the last two lines of the SQL:
'".JRequest::getVar('reference3relationship','', 'post', 'string', '' )."' ,
'".$_FILES[$allowed_s2[0]]['name']."');" );
Bob
Almost got it. I changed it just a bit and used the code below. I am trying to make the table output a clickable link. Do i need to do this differently than regular html? When i tried to add a link tag it did not work properly.
'".$filename."');" );
This topic is locked and no more replies can be posted.