Support

Account

Home Forums Backend Issues (wp-admin) PHP-code in default value field

Helping

PHP-code in default value field

  • Hi.
    I have a field which gives my special posts an incremental id. I am doing this manually. But i to insert in the field setup for the default value a php code, which does this for me. How can i realize that?

    TIA

  • Hi @goem

    You can use a filter called acf/load_field (please read the docs) to modify the default_value setting for the field via code.

    This will allow you to set the default value to anything you wish via PHP

    Thanks
    E

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘PHP-code in default value field’ is closed to new replies.