A quick question on the Settings API (2 posts)

  1. AndyWalpole
    Posted 4 years ago #

    Is the settings API only intended for use when creating forms to interact with the Options API or can it be used for other types of forms? I'm not sure how you would validation because register_setting() requires t

    Also, when using the settings API it is possible to create an options table field which automatically serializes an array. When the form is updated it replaces the data with a new serialized array. Is it possible to get the Options or Settings API to unserialise the field and add the new data from the form to the end of the array rather than just recreating it every time?

  2. AndyWalpole
    Posted 4 years ago #

    Okay, just found the answer to my second question:

    AFAIK there is no way to update a single element of a serialized option, you have to retrieve and send the whole group.


    So I'm going to have to create a new database table for my needs... which brings me back to my first question and how adaptive the Settings API is

Topic Closed

This topic has been closed to new replies.

About this Topic