Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

file form field : Uncaught TypeError: Cannot read property 'options' of undefined

edited May 2016 in Bug Reports
Sorry for many questions

in my frontend controller , I use form builder

$fields ['article'] = array("type" => "file" ,"folder" => "docs/", "accept" => "doc|docx|xml" , "multiple" => FALSE , 'label'=> lang("file")." *" );

when the form load , this error appear in consol "Uncaught TypeError: Cannot read property 'options' of undefined" it points to
// setup multi-file naming convention
$.fn.MultiFile.options.accept = jqx_config.assetsAccept;

and on submit it says that article field is empty

var_dump($this->input->post('article')); returns string(0)

any help please
fuel version is 1.3
Thanks

Comments

  • edited 6:10AM
    If you are using the file field type, it requires there to be the global jqx_config.assetsAccept variable set. In the admin, this is loaded in the header already with the view found in the fuel/modules/fuel/views/_blocks/fuel_header_jqx.php file. You can load that file ($this->load->module_view(FUEL_FOLDER, '_blocks/fuel_header_jqx'); or simply set some of those jqx_config object variables in your page separately.
Sign In or Register to comment.