Custom forms with HTML

In theory, this should work just fine if you are putting the code directly into a theme file, and not into a post body or something. However, it is very dependent on your site’s setup. Here are some things to watch out for:

  • Permalink structure: if using GET requests to process the form, test to make sure they aren’t getting overwritten or trashed by the .htaccess rules.
  • Reserved words: be careful not to use some variable names/terms that WordPress uses internally. See the Codex reference for a mostly complete list, and this forum post that gives some experiences with it. The best way to resolve it? Preface all of your form elements with a custom prefix, like my_email_validation_xxxxx where xxxxx is the field you want.
  • Processing page: you may need to be creative on where the processing occurs to handle the form. It will be easiest to send this to a standalone PHP file not associated with WordPress to do the validation, and have that redirect to a normal WordPress page to continue the process.