Custom Fields
Re-Envisioned
Support MB Settings Page Adding field (button) when option has changed

  • Creator
    Topic
  • #20237
    Resolved badabingbreda
    Participant

    Hi there,

    I wonder if this is possible:

    I have a selectbox on a settings page that lets the user select a certain API network.
    When the user has selected a API to work with, I want to show a button that allows them to import data into the site. However, I don’t want to use a condition-logic ‘visible’ parameter, but add the button at runtime.
    I need it at runtime, because after the option is saved, it has to prepare some other stuff first.

    I know how to add fields to the array using wp-filter-hooks.

    I need a button to appear RIGHT AFTER saving the options. The problem that I’m facing however is that the options are saved only after the rwmb_meta_boxes filter has ran.
    The button is thereby only shown after a reload of settings page.

    Even more confusing is when you turn off using any of the API’s again. After clearing the API-setting, the button is still shown, solved after a reload.

    I wonder if there is a solution to this?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.