在我的视图中,我有这个隐藏的字段
<input type="hidden" id="logoID" name="logoID" class="logoID" value="123">
我像这样通过 jQuery使用data 属性向它添加额外的数据
$('.logoID').data('fileName', 'xyz.jpg')
// adds data attribute to input element -> <input ... data-fileName='xyz.jpg' />
现在我需要fileName
在我的控制器中检索它。我知道我可以通过
$form['logoID']->getData(); // 123
但我还需要数据属性( fileName
) 的值。我该怎么办?任何线索都非常感谢。