Harmster Posted March 27, 2013 Share Posted March 27, 2013 Hey, I am working on my module and i need to upload a file, a video in this case this is my code: $video_upload = new InputfieldFile(); $video_upload->attr('name', 'file'); $form->append($video_upload); This is what I get on my form. If i drag my video in it and the video starts playing (Google Chrome) Now i've gopt a few questions about this 1- How do i get a select file button in there? 2- How do i get the video in there? Thanks in advance Link to comment Share on other sites More sharing options...
Soma Posted March 28, 2013 Share Posted March 28, 2013 You screenshot is gone... I think you have to use $modules->get("InputfieldFile") to load an instance and not new InputfieldFile() See example form here https://gist.github.com/somatonic/5236008 There's also various threads about form and API. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now