CakePHP 3: How to create new widget that combine text and hidden inputs?

Can someone explain how to make widgets that will combine text and hidden inputs, where the {{hidden}} is replaced with a hidden input, and {{input}} with the text input type.

'questionWidget' => '{{hidden}}{{input}}'