2

was tying to create a <input type="button" /> in drupal 8, below code snippet

$button['button'] = array(
    '#type' => 'button',
    '#value' => $this->t('#Clear'),
);

followed by

render($button)

It's not working as expected. An input type submit is being created instead.

enter image description here

I have also check the example module for D8 here, same thing occurs here.

How do I create an input type=button, any help ? , or am I doing some thing wrong ?

0

Browse other questions tagged or ask your own question.