Check whether a client's email address is valid

WPPizza – A Restaurant Plugin for WordPress Support General Support Check whether a client's email address is valid

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14188
    heximal
    Participant

      Hi, Olly!

      I have the following problem – most of my clients are workers at local shops, who order self pickup – they close shop for 5 minutes to come and get their order, and go back right again. Understandably, they want their food as warm as possible, so they want to receive a heads up when it’s ready.

      Sending an email back to them is easy. However, not everyone input their addresses right – not only do they not receive a copy of their order (which is not such a big problem for them, although I keep receiving “failed to send” messages from the server, for days), but also, there’s no way for me to contact them and let them now they can now come over to pick their order.

      Is it possible to implement some sort email check? I suppose the easiest would be to enter their email twice and check if both fields match?

      I also have a feature request on this topic, but I will post it separately in a bit.

      Thank you!

      #14200
      Olly
      Admin & Mod

        maybe one day i’ll add that as an option. not in the immediate future though.

        In any case, this should be easy enough as it is

        just add another (email) formfield on the confirmtion page
        either using one the action hooks – there are plenty of them
        or using one of the 12 formfields already available

        and then just some javascript along these lines perhaps
        http://stackoverflow.com/questions/18223467/email-match-with-confirm-email-address-in-contact-form

        #14201
        heximal
        Participant

          Yes, I’ve thought about adding a second email field, but that’s more work for the people ordering, and any changes I make to wp-pizza will be gone with each update.

          Thanks for the suggestions!

          #14202
          Olly
          Admin & Mod

            >and any changes I make to wp-pizza will be gone with each update.
            that’s why you should use actions / filters. that’s what they are there for

            #14203
            Olly
            Admin & Mod

              > but that’s more work for the people ordering,
              you can’t have it both ways.
              either you want to validate the email forcing people to enter it 2x or you don’t

              #14205
              heximal
              Participant

                Doh! Whether it checks if emails match or not, they have to enter them twice, yes.

                Not really a programmer, and don’t even know how to use actions and filters, but will read more about it, thank you for the information!

              Viewing 6 posts - 1 through 6 (of 6 total)
              • The topic ‘Check whether a client's email address is valid’ is closed to new replies.