我想用单选按钮标记图像并将其发送到表单中,我需要此按钮的值是该图像的名称,我的代码是:
<?= $form->field($model, 'imageFiles[]')->widget(FileInput::classname(), [
'options' => ['multiple' => true, 'accept' => 'image/*', 'id'=>'inputFile'],
'pluginOptions' => [
layoutTemplates' => [
'footer' => "<div class=\'file-thumbnail-footer\'>\n" .
" <div class='file-caption-name' style='width:{width}'>{caption}
</div>\n" .
{progress} {actions}" .
'<div><br>
<div class="radio-btn">
<input type="radio" "id="rc1" name="rc1" checked="checked">
<label for="rc1"><span class="label label-default" style="font-size:
1em;">Main image</span></label>
</div></div>'.
"</div>"
],
'uploadUrl' => '/ads/create',
'previewCaption' => false,
'fileActionSettings'=>['showZoom'=>false, 'showUpload'=>false],
'previewFileType' => 'image',
'maxFileCount' => 4,
]
]);
?>
我该怎么做呢?我想要这个:value='{image name}'