Custom submit button text I have a  classic contact form. I can add for example some custom placeholder like this :

function my_theme_form_contact_message_about_your_project_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {
    // placeholder
    $form['field_contact_name']['widget'][0]['value']['#placeholder'] = t('Saisir votre nom');

} 


It works very well and I can also easily modify wrapper, name, etc.

But for a reason I can’t understand, I am not able to modify the text of the submit button.

Here is what I’ve tried among a lot of things and I think it should be the right thing (as seen on other answers) :

$form['actions']['submit']['#value'] = 'hello world!';


Here is the html of the button :

&lt;button data-drupal-selector="edit-submit" class="button button--primary js-form-submit form-submit btn-primary btn" type="submit" id="edit-submit" name="op" value="Envoyer"&gt;Envoyer&lt;/button&gt;


I use a custom theme based on Bootstrap theme.

Of course, I can do it with jQuery :

$('#edit-submit').text('lorem ipsum');


But I would like to know how to do it the Drupal way.

EDIT :

The solution is :

form['actions']['submit']['#value'] = 'hello world!';


It works on a clean Drupal install but not on the website I am currently working on.
Do you know why it is not working ?


Because it seems to me that you're playing the guessing game. 

How about installing the Devel and adding kint($form) to inspect the $form array?

You will see its

$form['actions']['submit']['#value'] = t('Post Comments');