Announcement

Collapse
No announcement yet.

toolkit sendpage contact form required fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    toolkit sendpage contact form required fields

    I am using the toolkit sendpage with a contact form. What I want to do is make all fields required and not just the to_email and inquiry fields that Bill had on his example. But...for some reason they aren't working....it sends even when there is a blank field. Can toolkit's sendpage require a field not to be blank? If yes, can you give example code for the RCPT2 for requiring a blank field to be filled in?

    Should have said...the ones I want to not be blank are new fields that I inserted...Bill's example fields work fine.

    Yes, his example works perfectly when I set that up. I just need the extra fields that I inserted to not be blank.

    Sniffle....I miss Bill....

    Jamie
    Last edited by jsdva; 09-18-14, 09:15 AM.
    Jamie Donaldson
    JSDVS Web Design / Development
    Web Design | Web Development | E-commerce Design & Integration

    #2
    Re: toolkit sendpage contact form required fields

    Just curious but is this form something like a 'send to a friend' system where you can type in an email address and message on the web page to send it to a friend? Only reason I ask is because if that is what it is, I'd recommend not doing it. We have seen those being exploited to send spam quite frequently over the past few months, even if the spammer can't control the body of the message that goes out, they just start sending to addresses anyway for the joy of causing someone's website or domain to be blacklisted because of all the messages going to people who consider them spam.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      Re: toolkit sendpage contact form required fields

      No. It is just a contact form that I added fields to and used the toolkit's sendpage with math challenge question. It sends the response to the site owner. It's the one under the unlimited contact forms heading near the bottom of this page: https://www.emporiumplus.com/v5/tksendpage.htm

      Jamie
      Jamie Donaldson
      JSDVS Web Design / Development
      Web Design | Web Development | E-commerce Design & Integration

      Comment


        #4
        Re: toolkit sendpage contact form required fields

        Jamie,

        In light of David's comment, you might consider using our Easy Contact module. It has several, very advanced SPAM detection methods and, if Spammers and Bots get any smarter WE'LL be the ones to find another alternative. (We've already updated our spam detection three times.)

        (Oh, and this goes for everyone else too, not just Jamie...this is one area where you don't want to have to be constantly trying to stay one step ahead of the villains.)

        (Oh, Oh, I've actually had the x + x trick hacked btw.)
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Re: toolkit sendpage contact form required fields

          Good advice, Bruce. It is really, really tiresome trying to stay ahead of them. I'll talk to the client.

          Thanks,

          Jamie
          Jamie Donaldson
          JSDVS Web Design / Development
          Web Design | Web Development | E-commerce Design & Integration

          Comment


            #6
            Re: toolkit sendpage contact form required fields

            You may be better off using client side JavaScript Validation. However, it should work by setting the Kill Email variable. This will prevent the email from being sent. So you could test to see if your custom field are populated and if they are not, set the kill email variable to true.

            Bruce's module is also a great option, it works really well.
            Last edited by Brennan; 09-18-14, 11:50 AM.
            Brennan Heyde
            VP Product
            Miva, Inc.
            [email protected]
            https://www.miva.com

            Comment


              #7
              Re: toolkit sendpage contact form required fields

              Just wanted to add one more comment in case it is applicable. A lot of comment forms tend to send to the site owner with the "From" address set to that of the customer. This is not a problem if the website and email for the domain are not only hosted on the same server but also not forwarded elsewhere, but many times that is not the case. Sometimes mail is hosted on a different server at the same provider, or email being hosted elsewhere like Google Apps, or email hosted locally but forwarded to a remote email account at Gmail, etc.

              The reason I mention this is because if a message is generated from the visitor's domain and it has to go to another server, it will not pass SPF or DKIM, two big anti-spam protocols, and the messages may disappear or get marked as spam. Just didn't want you to run into that and not know where the messages went. If the "From" is kept as the site domain and the visitor's address is in the comment body, no problem.
              David Hubbard
              CIO
              Miva
              [email protected]
              http://www.miva.com

              Comment


                #8
                Re: toolkit sendpage contact form required fields

                Originally posted by Brennan View Post
                it should work by setting the Kill Email variable. This will prevent the email from being sent. So you could test to see if your custom field are populated and if they are not, set the kill email variable to true.
                That was where I was going, but apparently I wasn't doing something right, since it let the email address input go through blank:

                Code:
                <mvt:if expr="'<' IN g.from_email">
                <mvt:item name="toolkit" param="sassign|from_email|email required" />
                <mvt:item name="toolkit" param="sassign|kill_email|Email Required" />
                </mvt:if>
                Jamie
                Jamie Donaldson
                JSDVS Web Design / Development
                Web Design | Web Development | E-commerce Design & Integration

                Comment


                  #9
                  Re: toolkit sendpage contact form required fields

                  Originally posted by ILoveHostasaurus View Post
                  Just wanted to add one more comment in case it is applicable. A lot of comment forms tend to send to the site owner with the "From" address set to that of the customer. This is not a problem if the website and email for the domain are not only hosted on the same server but also not forwarded elsewhere, but many times that is not the case. Sometimes mail is hosted on a different server at the same provider, or email being hosted elsewhere like Google Apps, or email hosted locally but forwarded to a remote email account at Gmail, etc.

                  The reason I mention this is because if a message is generated from the visitor's domain and it has to go to another server, it will not pass SPF or DKIM, two big anti-spam protocols, and the messages may disappear or get marked as spam. Just didn't want you to run into that and not know where the messages went. If the "From" is kept as the site domain and the visitor's address is in the comment body, no problem.
                  That makes me think of something that I recently went through with the host: Another contact form on the site (....one not using toolkit, which was why I was using the toolkit on this latest form.... ) was coming back with the host's name in the from section of the email. Well, I wanted it to be *From* the client's email address, and it was clearly setup in the php file to be the client's email address as the *From*, so after the host did a couple of days of workarounds on it, they finally got the email to display the client's email address in the From section of the email. Not sure how though.

                  I hadn't run into something like that before, so I was just wondering do you think the host (they host Miva applications/sites but are not Miva...maybe a partner or something) is routing the emails through another server or something else? And, do you think that would make them not pass through the anti-spam protocols?

                  I don't want the client to deal with bunches of spam.

                  Jamie
                  Jamie Donaldson
                  JSDVS Web Design / Development
                  Web Design | Web Development | E-commerce Design & Integration

                  Comment


                    #10
                    Re: toolkit sendpage contact form required fields

                    I don't understand what you are checking with this
                    <mvt:if expr="'<' IN g.from_email">
                    <mvt:item name="toolkit" param="sassign|from_email|email required" />
                    <mvt:item name="toolkit" param="sassign|kill_email|Email Required" />
                    </mvt:if>

                    That block of code will not run if < is in the from email. They are not going to put the < in their email address so it is not relevant. They might have something like [email protected] Hence no < would be there and the block of code would not run. Likewise if they left the from address blank, the < is not there either, hence it won't run.
                    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                    Facebook http://www.facebook.com/EmporiumPlus
                    Twitter http://twitter.com/emporiumplus

                    Comment


                      #11
                      Re: toolkit sendpage contact form required fields

                      Bill!?!? So happy!!

                      That was in the example http://https://www.emporiumplus.com/v5/tksendpage.htm at the bottom of the page in the inquiry...I got turned around and copied/pasted that right in. I'll take it out. In fact, I inserted the same with the new fields I put in.

                      So, I'll change this:

                      Code:
                      <mvt:if expr="'<' IN g.from_email">
                      to

                      Code:
                      <mvt:if expr="g.from_email">
                      and it should work, correct. I just want to make sure the fields are not left blank.

                      Didn't catch the IN. Too long a day staring at code.

                      Jamie
                      Jamie Donaldson
                      JSDVS Web Design / Development
                      Web Design | Web Development | E-commerce Design & Integration

                      Comment


                        #12
                        Re: toolkit sendpage contact form required fields

                        That would cause it to kill it if there is an email. Exactly what are you trying to do? If you want to make sure it is not blank you could use something like "NOT g.from_email". But that won't validate the the characters. EG. if you want make sure it has an @ character and a . character, that would be a different phrase.
                        Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                        Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                        Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                        Facebook http://www.facebook.com/EmporiumPlus
                        Twitter http://twitter.com/emporiumplus

                        Comment


                          #13
                          Re: toolkit sendpage contact form required fields

                          I just want to make sure all fields are not blank. We need name, street address, and city beyond what your example shows. And, I am at a loss as to how to require something be put in those, since trying to check for specifics on each of those fields would be difficult, so not blank would help. Email address with the @ would be fine by itself, but the period would be nice...yes...I need help there. I believe I've got it for state using a drop down.

                          Jamie
                          Jamie Donaldson
                          JSDVS Web Design / Development
                          Web Design | Web Development | E-commerce Design & Integration

                          Comment

                          Working...
                          X