Hi!
Is it possible to customize the output of input element?
For example the default input field looks like this:
<input type="text" id="acf-field_5700d00f68aba" name="acf[field_5700d00f68aba]" value="" placeholder="">
What if we wanted to add custom attributes? For example, an angular attribute?
<input ng-model="customVal" class="form-control" type="text" id="acf-field_5700d00f68aba" name="acf[field_5700d00f68aba]" value="" placeholder="">
You can see I added ng-model=”customVal” and class=”form-control”
Thanks
There aren’t any filters that will let you alter the attributes of a field that I can find in ACF. If you look at the any of the field type classes in the plugin you’ll find an function named render_field
and this is where the form fields get output. Currently the only way you could do this would be to create a custom field type… or to alter the plugin, but then you’d need to make the same alterations every time you updated.
Thanks,
That is what I had expected.