I am using below code in drupal 10 form
$form['post_upload_files'] = [
'#type' => 'dropzonejs',
'#title' => $this->t('Upload Files'),
//'#description' => $this->t('Upload multiple files, including images and documents.'),
];
I am not getting value after file upload in form_state
public function submitFormAjax(array &$form, FormStateInterface $form_state) {
$response = new AjaxResponse();
//$name = $form_state->getValue('name');
$files = $form_state->getValue('post_upload_files');
return $response;
}
$files variable value is coming with empty array even after file upload
Active
2.10
Code