Tagged: admin page, forms, settings
- This topic has 3 replies, 2 voices, and was last updated 1 year, 8 months ago by
Steve.
-
AuthorPosts
-
-
May 14, 2020 at 12:05 pm #10652
luisParticipanthi! , 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. -
May 15, 2020 at 10:32 am #10654
SteveKeymaster@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://piklist.github.io/docs/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://piklist.github.io/docs/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!
-
May 15, 2020 at 6:45 pm #10655
luisParticipantThanks a lot! that helped me a lot, it’s an impressive framework
-
May 19, 2020 at 10:37 am #10657
SteveKeymasterGlad you like it!
-
-
AuthorPosts
- The topic ‘How to save data in admin page’ is closed to new replies.