Yii2 - hidden input value

ActiveForm

$form->field($model, 'book')->hiddenInput(['data-attr' => 'any_data'])->label(false);

Helper html

$form->field($model, 'book')->hiddenInput(['data-attr' => 'any_data'])->label(false);