Support

Account

Home Forums ACF PRO Option Pages – Advanced Configuration

Solving

Option Pages – Advanced Configuration

  • I am struggling to find ANY documentation on “Option Pages – Advanced Configuration – Advanced Settings”.. specifically Data Storage and Custom Storage.

    Can someone point me to where documentation for the above is located?

  • On the page:
    https://www.advancedcustomfields.com/resources/options-page/

    Understanding this is confusing.
    Data Storage

    • Controls where the options page stores field data. Defaults to “Options”, storing the field data in the options table. Selecting “Custom Storage” instead of “Options” allows loading of field data from a post, user, or term.

    Instead of “Options” allows loading of field data from a post, user or term..
    What exactly does this mean? It says loading, so does this mean data can be loaded from what / where of a user’s data?

    Custom Storage

    • This setting only appears if “Custom Storage” is selected under “Data Storage.” The input can be a numeric post ID or a string.

    Confused about after selecting custom storage.. what exactly does input can be a numeric post ID or a string???

  • Data can be stored in the default location, that is in the _options table. Or it can be stored on for a specific post, user or term.

    Examples:
    (numeric) 1 = Store values in post meta table for post ID 1
    (string) term_1 = store values in term meta table for term ID 1
    (string) user_1 = store values in user meta table for user ID 1

    Special Strings
    “my-options” = stores values in the options table. By default all fields are stored here with the field name prefixed by “options” or “options_{$field_name}”. Using a custom string will cause the option name to change “my-options_{$field_name}”

  • Thanks for the explanation!
    And I totally understand it. Now the confusion is, since this is fields for “Options Page(s)” why would data be sored in, for example user’s meta?

    I understand why ACFextended (which I have) and HookTurn have functionality that can save groups / fields in a ‘custom’ table.
    But I don’t understand why ACF would, while creating an Options Page, store data in a particular user’s meta.

    Can you give me a short real-world example of ‘why’ this would be used?

    Or, here is an assumption I am making of why this may be useful:
    I have an options page, I create a simple text field that I can enter some simple data.
    I also have a dropdown that has a dynamic list of users.
    When saved, the data in the text field can be stored in the user’s meta that was selected from the dropdown?

  • It would be more complicated than that and using a user would be of limited use.

    Let’s say that you want a page separate from the user profile page to store additional user values. You could dynamically set the user where the values are save to for an options page based on the currently logged in user. Only one such page would ever be available and only the currently logged in user would be able to view or edit the values.

    I haven’t got a clue what use case would involve saving values to specific term.

    However, getting values from meta is generally faster than getting values from options unless you have the options set to autoload.

    I generally use the last option. This allows me to keep different options for different options pages separated in the options table and allows me to have the same field names used on multiple options pages because the option_name value varies by option page.

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

You must be logged in to reply to this topic.