Viewing 1 reply thread
  • Author
    Posts
    • #6183
      mandelkind
      Member

      I’ve got a settings section, holding the information for an imap mailbox. Now, whenever this page get’s submitted I’d like to validate the settings by trying to connect to the imap mailbox.

      If the connection was sucessfull, I’d like to modify the default “Settings saved” to “Settings saved and connection to mailbox sucessfull.” If the connection was not sucessfully, an error message should be displayed.

      I was only able to find validation for single fields, but not for a settings settings – how would I do this with piklist?

    • #6203
      Jason
      Keymaster

      Hey @mandelkind!

      You should be able to accomplish the API check using the piklist_pre_option_update hook. As far as the notice text goes, however, I’m honestly not sure if you can change that. I’ll do a bit more digging, but Piklist may be using built-in WordPress functionality for that, and I’m not sure there’s a way to change the message. Not saying there isn’t for sure, though. You can, however, add your own notice to display in addition to the other.

      Hope this helps!

Viewing 1 reply thread
  • You must be logged in to reply to this topic.