$form['cv'] = array(
    '#type' => 'managed_file',
    '#title' => t('Vaš CV'),
    '#default_value' => '',
    '#progress_message' => t('Molimo Vas sačekajte...'),
    '#upload_validators' => array(
        'file_validate_extensions' => array('pdf doc docx'),
        'file_validate_size' => array(5*1024*1024),
    '#description' => t('Dozvoljeni formati: pdf, doc, docx. Max 5MB'),

enter image description here

  • You can change 'Upload' with a simple form alter. 'Choose File' is set by the browser, and can't be changed without a hack. See stackoverflow.com/questions/5138719/… – Clive Jun 12 '14 at 13:47
  • But that is the problem I was trying with form alter it hasn't listed. I also try with '#process' and '#pre_render' but I hadn't succeeded – Nikola Jun 12 '14 at 14:10
  • #process is the right way - see drupal.stackexchange.com/questions/32358/… for a code example – Clive Jun 12 '14 at 14:25
  • Yes thanks, I did it :) also changed remove button text. I totally forgot that I can't change 'Choose File' text that is set by browser :D so I spend my time looking for changing this text because it's first element. I found that solution earlier, Stupid me. Thanks again! – Nikola Jun 12 '14 at 14:52

Browse other questions tagged or ask your own question.