Hi there!
I've been all the day with the same problem! Please help!
I have this form:
class PersonaBatchForm extends sfForm
{
public function configure()
{
$this->widgetSchema['csv_file'] = new sfWidgetFormInputFile(array(
'label' => 'Ingrese su archivo csv'
));
$this->widgetSchema['codificacion'] = new sfWidgetFormChoice(array
(
'choices' => array('utf-8' => 'UTF-8', 'latin-1' => 'Latin-1'),
'expanded' => true
));
$this->widgetSchema['loaded_filename'] = new
sfWidgetFormInputHidden();
$this->validatorSchema['csv_file'] = new sfValidatorFile(array(
'required' => false,
'path' => sfConfig::get('sf_upload_dir').'/batch',
'mime_types' => 'text/plain',
));
$this->validatorSchema['codificacion'] = new sfValidatorChoice(array(
'required' => true, 'choices' => array('utf-8','latin-1')
));
$this->validatorSchema->setOption('allow_extra_fields', true);
$this->widgetSchema->setNameFormat('batch[%s]');
}
}
And in the action, if I print the request, I get everything but the
'csv_file'. My <form> has the enctype="multipart/form-data" attribute.
The rare thing is that if I remove that enctype attribute from my
<form>, I receive the 'csv_file' parameter, but like a string (because
the browser doesn't upload it, of course)
I wonder if any of you have had the same problem...
Thank you!
ps: Sorry for my english!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---