I want to save a image file into my custom content type using forms api and node_save()
.
The below code works fine but I also get the upload button as it default in managed_file .
I don't want the upload button. So I tried type=file
but it did not work. How can I remove the upload button ?
Also if you just select the file and submit the form it works so I really need to just find a way to remove the upload button.
$form['image'] = array(
'#type' => 'managed_file',
'#title' => 'File',
'#upload_location' => 'public://my-files/'
);