Displaying form with a checkbox & text input field

I have a field that have both checkboxes AND a text input (see attached image).

What’s the correct way to this with Yii2? [size=“2”]I need to retrieve the values later. I know [/size]

[size=“2”]how to do it with jQuery but I have no [/size][size=“2”]idea how it’s done in Yii2. [/size]

Any help is appreciated.