Support

Account

Home Forums Backend Issues (wp-admin) "Add All" Function Reply To: "Add All" Function

  • Hello there,

    I agree that the first option is not really achievable, but I’d like to elaborate on the second one, if that’s all right.

    1) We add the button in HTML
    2) On clicking this button, we bind a JavaScript function toggling a variable say “SelectAll” to true or false.
    3) We’d somehow indicate to the user that All or None are selected.
    4) When user saves the post we use the acf/save_post hook to read our “SelectAll” variable and depending on its value we update the field accordingly. (Add or remove all guest members).
    5) Page reloads and correct result appears in the relation field.

    Can you please confirm my understanding is correct?

    Thank you 🙂