We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7971
    • 263 Posts
    Hi,

    ich habe ein Kontakt-Formular auf meiner Seite,

    doch leider sagt er mir Immer das "Name min. 2 Wörter erwartet" aber ich habe 2 Wörter drinstehen?

    Hier das Snippet:
    <br />
    	 <p><span style="color:#900;">[+validationmessage+]</span></p>
    	    <table width="97%" border="0" cellspacing="0" cellpadding="0">
    	
    		
    		<form method="post" action="[~[*id*]~]">
    		 <input type="hidden" name="formid" value="feedbackForm" />
              <tr>
    		  
    		  
                <td width="27%" class="AutoFont"><div align="left">Name:</div></td>
                <td width="73%">
                  
                  <div align="left">
                    <input name="Name" type="text" class="texterea" size="40" maxlength="60" eform="Name::1: Erwartet min. 2 Wörter:#REGEX /\w+\b\w{2,}/i" />
                    </div></td></tr>
              <tr>
                <td class="AutoFont"><div align="left">E-Mail:</div></td>
                <td>
                  <div align="left">
                    <input name="email" type="text" class="texterea" size="40" maxlength="40" eform="Your Email Address:email:1" />
                    </div></td></tr>
              <tr>
                <td width="28%" height="83" valign="top" class="AutoFont"><div align="left">Text:</div></td>
                <td valign="top">
                  <div align="left">
                    <textarea name="comments" cols="38" rows="5" class="texterea" eform="Comments:html:1"></textarea>
                    </div></td></tr>
              <tr>
                <td class="AutoFont"><div align="left">Bitte Anti-Spam-Code eingeben: </div></td>
                <td><div align="left"><img src="[+verimageurl+]" alt="verification code" border="1"/></div></td>
              </tr>
              <tr>
                <td><div align="left"></div></td>
                <td><div align="left"></div></td>
              </tr>
              <tr>
                <td class="AutoFont"><div align="left">Code:</div></td>
                <td>
                  <div align="left">
                    <input name="vericode" type="text" class="texterea" size="20" />
                    </div></td></tr>
              <tr>
                <td><div align="left"></div></td>
                <td><div align="left"></div></td>
              </tr>
              <tr>
                <td><div align="left"></div></td>
                <td>
                  <div align="left">
                    <input name="submit" type="submit" class="textereaButton" value="Senden" />
                    </div></td></tr>
    		  </form> 
            </table>
    
      • 7971
      • 263 Posts
      Weiss keiner woran das liegen könnte?
        • 17883
        • 1,039 Posts
        Keine Ahnung, bin kein regex Experte. Sicher dass der Ausdruck stimmt? Und probier mal:

        eform="Name:string:1: Erwartet min. 2 Wörter:#REGEX /\w+\b\w{2,}/i"
          • 7971
          • 263 Posts
          Geht auch nicht. Ich habe das so aus der Doku von eForms übernommen.
          Ist ja auch wieder mal alles in fu****ing English smiley

          Aber so ganz "unenglish" bin ich ja nicht. Hab es auch eigenlich genauso gemacht wie beschrieben.
            • 7971
            • 263 Posts
            Mir würde reichen wenn er überprüft das da überhaupt etwas steht.
            Muss nicht unbedingt auf 2 Wörter überprüfen.

            Kann mir jeand sagen wie ich das hinbekomme. Wess nicht wo der Fehler liegen könnte.
              • 17883
              • 1,039 Posts
              Laut Doku

              The basic format of the eform attribute is:

              [description/title]:[datatype]:[required]:[validation message]:[validation rule]
              Data types

              You only need to set the following data types. Others will be set automatically (radio & checkbox as they are, string for textbox and listbox for select)

              Standard validation: All fields that are required will be checked if they are left empty.

              * string - No specific validation besides checking if it’s empty if the field is required.
              * date - Checks if it is a valid date (based on php’s strtotime() function)
              * integer - Checks if it is a number (does not check if it is in fact an integer)
              * float - Checks if it is a number
              * email - Checks if it’s a valid email address using a simple regular expression
              * file - (for file upload input) - checks if a size error occurs, does not currently check file type
              * html - Same as string except that it converts line endings (\n) to
              tags

              The listbox, checkbox and radio fields do normally not require the datatype to be set. eForm will recognize these automatically. It will validate the values against the list of values placed in the form.

              sollte

              eform="Name:string:1: Bitte Namen ausfüllen"


              eigentlich den Job machen.
                • 7971
                • 263 Posts
                Ja danke das hat geklappt.