Viewing 3 reply threads
  • Author
    Posts
    • #10652
      luis
      Participant

      hi! , I have an admin page and create a workflow with tabs at the moment I only have a textarea, and I will add more options but I am a little lost to be able to save the data, I read the documentation and I saw the filter piklist_pre_update_option but I do not understand how to use it and where place it, sorry if it is something simple but I can not understand it, I hope you can help me, I leave the image of what my admin page looks like thanks in advance

      Attachments:
      You must be logged in to view attached files.
    • #10654
      Steve
      Keymaster

      @luis– So, you have a few options here:

      1) Create a SETTINGS page. Instead of an admin-page, create a settings page and the data will be saved with the WordPress settings api: https://docs.piklist.com/tutorials/settings/building-settings-pages/

      2) If you want to keep the admin-page you can create a separate Piklist Form and embed it into the admin-page. The benefit with a form is that you can save the data anywhere you want: settings, post_meta, user_meta, etc or a combination of all.
      — Create the form: https://docs.piklist.com/forms/
      — use this function call in your admin-page to embed the form:

       piklist('form', array(
          'form' => 'your-form-file-name-without-the-php'
        ));

      Either way will work!

    • #10655
      luis
      Participant

      Thanks a lot! that helped me a lot, it’s an impressive framework

    • #10657
      Steve
      Keymaster

      Glad you like it!

Viewing 3 reply threads
  • The topic ‘How to save data in admin page’ is closed to new replies.