You need to use the attr
binding to set any attributes like id
or name
<span class="cld" data-bind="text:flid"/>
<input type="hidden"
data-bind="attr: { id: 'hid_freq_' + flid(), name: 'hid_freq_' + flid() }">
Note: you only need to write flid()
only if your flid property is a ko.observable
otherwise you just need 'hid_freq_' + flid
.