I have the following form in the custom plugin which I am developing now and clicking on the update button does not generate $_POST request.

<form name="HomePageManagerStatus" id="HomePageManagerStatus" method="post" enctype="text/plain">
   <input name="homePageEdit" type="checkbox" id="homePageEdit">Enable

According to the WP codex, the submit_button in WP will generate the HTML code for the submit button. (See example in Codex https://codex.wordpress.org/Function_Reference/submit_button ).

So, additional info needed: what is the generated page code look like for the form? (from the Page Source). Is any code being generated?

But that's not your problem. The problem is the 'Required' parameter of the statement; it is invalid. Should be

required="Enable" >

Closing ">" is missing also.

Sometimes, looking at the generated page code will help you find the problem.

  • I have removed the required but still not working. Mar 15 '17 at 18:13
  • Have you looked at the generated code (page source code) to see what is being generated? You could paste that <form></form> block into a PHP editor that has the ability to check syntax. Edit your question to add the generated code (add to your question, leave the original code there). Mar 16 '17 at 2:52

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.