Home Forums Backend Issues (wp-admin) Modify Field Settings Form Reply To: Modify Field Settings Form

  • Two undocumented hooks, not documented as in not in the site.

    One of the is called when rendering field settings. this is the function in specific field types that outputs the field inputs when you’re creating a field group acf/render_field/type={$field_type_name}. It displayes inputs that are not part of every field type. For an idea of what you would do in this filter look at the render_field() function in any of the field types. If you added a filter on this hook with a priority of < 10 it would add field settings before the field specific settings, using a priority > 10 would output them after.

    The second hook is acf/render_field_settings/type={$field_type_name}. This is the hook that’s called when the inputs the user sees on a post or other location is called. You can see what you would do in this filter by looking at the render_field_settings() function in any field of the field type files.

    I don’t see any way to set defaults for any field settings you might choose to add though, these are set when the class in instantiated and there’s no way to hook into that.

    There isn’t any way to override what the build in functions do but you can add to what they do either before or after they do it. I’m not sure using them in the way might cause any unintended side effects.