Open timiwahalahti opened 7 years ago
@timiwahalahti need help with this? codesniffer just doesn't like your tabs. :)
@timiwahalahti got any time to fix this? Could be an useful feature for 1.5 :wink:
phpcbf should fix any tabs for you: ./vendor/bin/phpcbf --standard=./phpcs.xml .
I'll milestone this to 1.5 and fix this week.
I'll work with this next week.
Let's try this PR again with different branch.
As discussed in #50, this implements quite simple fallback to handler when submitting form without javascript. It can be turned on with filter.
Because some terms are reserved for WordPress core, this PR also implements check for those in fallback mode and shows error when using those terms as input names.
After successful form handling user is redirected to referrer page and thank you message is shown instead of form. When validation contains errors, message from validator is shown below form the same way as with javascript. Only downside is that inputs are cleared :/ But I think we can accept that, because browsers supports input checks quite widely. Can we?
Needs a bit more testing, updates to README and opinion about success/error handling.