Hi, I’m not sure if this is a feature request or something which already exists. Or something I could just do if my php knowledge was better.
Essentially I want to just be able to add a field setting (through acf_render_field_setting) to existing custom fields. Instead of creating entirely new ones.
I have currently done this by just cloning the fields and renaming them in a custom plugin. But literally all I want to do is add 1-2 attributes for a couple of field, so this method is a bit silly.
I have also alternatively done this through just calling a function inside of the actual fields, but this obviously has problems with updates / security checks.
So it would be nice to have some hooks, or if there already is a way to do this and I’m just stupid.
Hi @teapoted
So what do you want to do more specifically? Add like a checkbox of some feature for some of the field types? Or add something to the actual inputs created by the fields?
I really just want to add some attribute to the field, like the prepend or append attributes. I’m doing this because I’m outputting the fields (on the front-end) dynamically, so this will be information about how it should be output.
As said I have it working fine, but it requires me to put a hook in the main plugin files myself, or recreate all the fields.
I see. I think it would be a good idea to have a filter that lets powerusers modify/add/remove functionality in core fields.. I’ll notify Elliot of this and we’ll see what he says!
In the meantime a solution (albeit not a pretty one) would be to “hardcode” the information on a per field basis using this hook:http://www.advancedcustomfields.com/resources/acf-render_field/
Alright, that would be much appreciated.