Trying to stick to WordPress best practices and improving how I do plugin development I have searched through the codex and developer documentation to see if there is anything indicating what is preferred when developing forms in setting pages in regard to what HTML and CSS is used. My goal is to improve how I develop my plugins and stick to what is already offered for developing a settings/menu page but when I search for a discussion or documentation on the topic I am clouded with:

Nothing official about the forms or if they should use WordPress's generic HTML and CSS implementation. So does WordPress have any documentation or standards that exist for forms in the menus/settings pages or is it always going to be the discretion of the developer?

  • I just view the admin source and copy the structure from there. – Andy Macaulay-Brook Aug 12 '16 at 19:56
  • 1
    I've done that as well but I would have thought based on everything else that has been included in the codex as "you should do this" it surprises me I dont see anything on forms – DᴀʀᴛʜVᴀᴅᴇʀ Aug 12 '16 at 19:57
  • 1
    You could write it :-) – Andy Macaulay-Brook Aug 12 '16 at 19:59
  • id be afraid to but I might make something on github. – DᴀʀᴛʜVᴀᴅᴇʀ Aug 12 '16 at 19:59
  • 1
    Are you using the Settings API? Afaik it handles a lot of the frontend display as well – Tim Malone Aug 12 '16 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.