file upload - Symfony: form field access with no sfForm object -
i'm working on symfony project , developed form upload file , save info table in model. , didn't use sfform class implement form. here have form
<form name="new_file" action="<?php echo url_for('home/uploadfile');?>" method="post"> <input type="file" id="file"> <input value="<?php echo $codigo_maestro?>" id="master_id"> <input value="<?php echo $codigo_entidad?>" id="entity_id"> <input type="submit" value="upload"> </form>
so i'm trying access fields of sumbited form in action function , don't know how :(
$request->getparameter('file'); $request->getparameter('master_id'); $request->getparameter('entity_id');
this code didn't work. please me solve this! how can access fields of form action??
you need add name form fields, that's name can access them via $request->getparameter()
.
Comments
Post a Comment