erickertz / acf-hidden

A hidden field for Advanced Custom Fields
29 stars 16 forks source link

How does it work? #1

Open YiorgosTheo opened 10 years ago

YiorgosTheo commented 10 years ago

Hi, I downloaded this plugin and it does allow to create a hidden field but it doesn't hold any default values that would be saved along with the visible fields. How is it supposed to be used?

Regards,

Yiorgos

erickertz commented 10 years ago

Yiorgos,

The plugin does very little on its own. I usually use it in combination with other plugins or custom functionality that need a hidden field.

You can create a default value field if you'd like. There is some commented out code that will point you in the right direction doing so. In acf-hidden-v4.php, check out the create_options and create_field functions. In acf-hidden-v4.php, take a look at the render_field_settings and render_field functions.

Hope this helps.