File Upload Errors

n3eight 29 Jul, 2009
When an error is raised based on a file upload (because it is not an accepted extension or not in the accepted size range), it seems that you are redirected to the form and the error message is shown. However, I am using code to display the form within another component:


$posted = JRequest::get('post',JREQUEST_ALLOWRAW);
$form =& CFChronoForm::getInstance($formName);
$form->showForm($formName, $posted);

Is there any way I can change the redirect url when an error is raised? That way I can redirect to a page within my component that shows the form. Also, would it be possible to set the error display message in this fashion (if not, I have another work-around, but it would be nice). Thanks
Max_admin 03 Aug, 2009
Hi, no easy way, maybe you can copy the submit routine from the submitform function to your component and play with it, I have plans to make this more flexible!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.