<?php

/* @var $this yii\web\View */

$this->title = 'My Yii Application';
?>
<div id="content">
    <form action="" method="post">
    	<input type="hidden" name="_csrf" value="<?=Yii::$app->request->getCsrfToken()?>" />
    	<?php foreach($options['option_values'] as $key => $val) {
    	   ?>
    	   <input type="hidden" name="options[<?=$key?>][option_id]" value="<?php 
    	       if(empty($val->optionValue)) {
    	           echo $key;
    	       } else {
    	           echo $val->optionValue->option_id;   
    	       }
    	   ?>" />
    	   <label for="options[<?=$key?>][option_value]"><?=$key?></label>
    	   <input type="text" name="options[<?=$key?>][option_value]" />
    	   <?php
    	}?>
    </form>
</div>