• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

1.4 "Please leave this field blank"

#1
Okay.. so i know this is a part of the new honeypot thing.. but this is showing to all users on my forum when registering, and is quite franctly just confusing and otherwise just.. well should not be there.

The update does say its supposed to be "Invisible", but is actually instead just preventing people from registering at all.

upload_2014-8-20_21-33-25.png

They also seem to have a tendancy to move around quite a bit. I have managed to remove the custom fields part, but is there a way i can just remove this feature, because i can deal with spammers myself.. I'd rather people be able to signup than nobody at all..

The bug here though being of course.. why are these here at all?
 

Chris D

XenForo developer
Staff member
#4
Revert the register_form template in each style. Or at least do it with one style and then test that solves the problem.
 

Mike

XenForo developer
Staff member
#7
It would be another template then -- such as CSS templates. You need to follow the standard upgrade steps and deal with anything in the outdated templates list.
 
#8
Fix code reg

Code:
<xen:title>{xen:phrase sign_up}</xen:title>

<form action="{xen:link 'register/register'}" method="post" class="xenForm AutoValidator"
    data-fieldValidatorUrl="{xen:link register/validate-field}"
    data-normalSubmit="1"
>
    <xen:if is="{$errors}">
        <div class="errorPanel">
            <h3 class="errorHeading">{xen:phrase please_correct_following_errors}:</h3>
            <div class="baseHtml errors">
                <ol>
                <xen:foreach loop="$errors" value="$error">
                    <li>{xen:raw $error}</li>
                </xen:foreach>
                </ol>
            </div>
        </div>
    </xen:if>

   

    <dl class="ctrlUnit">
        <dt><label for="ctrl_{$fieldMap.username}">{xen:phrase name}:</label></dt>
        <dd>
            <input type="text" name="{$fieldMap.username}" value="{$fields.username}" class="textCtrl" id="ctrl_{$fieldMap.username}" autofocus="true" autocomplete="off" />
            <p class="explain">{xen:phrase this_is_name_that_will_be_shown_with_your_messages}</p>
        </dd>
    </dl>

   

    <dl class="ctrlUnit">
        <dt><label for="ctrl_{$fieldMap.email}">{xen:phrase email}:</label></dt>
        <dd>
            <input type="email" name="{$fieldMap.email}" value="{$fields.email}" dir="ltr" class="textCtrl" id="ctrl_{$fieldMap.email}" />
        </dd>
    </dl>

    <fieldset>
       

        <dl class="ctrlUnit">
            <dt><label for="ctrl_{$fieldMap.password}">{xen:phrase password}:</label></dt>
            <dd><input type="password" name="{$fieldMap.password}" class="textCtrl OptOut" id="ctrl_{$fieldMap.password}" autocomplete="off" /></dd>
        </dl>

        <dl class="ctrlUnit">
            <dt><label for="ctrl_{$fieldMap.password_confirm}">{xen:phrase confirm_password}:</label></dt>
            <dd>
                <input type="password" name="{$fieldMap.password_confirm}" class="textCtrl OptOut" id="ctrl_{$fieldMap.password_confirm}" />
                <p class="explain">{xen:phrase enter_your_password_in_first_box_and_confirm_it_in_second}</p>
            </dd>
        </dl>

       
    </fieldset>
       
    <dl class="ctrlUnit">
        <dt>{xen:phrase gender}:</dt>
        <dd>
            <ul>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="male" {xen:checked "{$fields.gender} == 'male'"} /> {xen:phrase male}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="female" {xen:checked "{$fields.gender} == 'female'"} /> {xen:phrase female}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="" {xen:checked "!{$fields.gender}"} /> ({xen:phrase unspecified})</label></li>
            </ul>
        </dd>
    </dl>

    <xen:include template="helper_birthday_row_register" />


    <dl class="ctrlUnit submitUnit">
        <dt></dt>
        <dd>
            <xen:set var="$timerHtml"><xen:if is="{$xenOptions.registrationTimer}">
                <span id="RegTimer">({xen:phrase please_wait_x_seconds, "seconds=<span>{$xenOptions.registrationTimer}</span>"})</span>
            </xen:if></xen:set>
            <xen:if is="{$tosUrl}">
                <ul>
                    <li>
                        <div class="text">{xen:phrase i_agree_to_terms_and_rules, 'checkbox=<input type="checkbox" name="agree" value="1" id="ctrl_agree" class="Disabler" />', 'terms_attributes=href="{$tosUrl}" target="_blank"'}</div>
                        <ul id="ctrl_agree_Disabler">
                            <li><input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" id="SubmitButton" /> {xen:raw $timerHtml}</li>
                        </ul>                       
                    </li>
                </ul>
            <xen:else />
                <input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" id="SubmitButton" /> {xen:raw $timerHtml}
            </xen:if>
        </dd>
    </dl>

    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
    <input type="hidden" name="reg_key" value="{$regKey}" />
</form>

<xen:if is="{$xenOptions.registrationTimer}">
    <script>
    (function($) {
        $(function() {
            var rt = $('#RegTimer'), s = rt.find('span'), t = parseInt(s.text(), 10),
                sub = $('#SubmitButton'),
                i = setInterval(function() {
                    t--;
                    if (t <= 0) {
                        rt.hide();
                        clearInterval(i);
                    } else {
                        s.text(t);
                    }
                }, 1000);

                var f = function(e) {
                    if (t > 0) {
                        e.preventDefault();
                    }
                };

                sub.click(f);
                sub.closest('form').submit(f);
        });
    })(jQuery);
    </script>
</xen:if>
 
#9
Fix code reg

Code:
<xen:title>{xen:phrase sign_up}</xen:title>

<form action="{xen:link 'register/register'}" method="post" class="xenForm AutoValidator"
    data-fieldValidatorUrl="{xen:link register/validate-field}"
    data-normalSubmit="1"
>
    <xen:if is="{$errors}">
        <div class="errorPanel">
            <h3 class="errorHeading">{xen:phrase please_correct_following_errors}:</h3>
            <div class="baseHtml errors">
                <ol>
                <xen:foreach loop="$errors" value="$error">
                    <li>{xen:raw $error}</li>
                </xen:foreach>
                </ol>
            </div>
        </div>
    </xen:if>

  

    <dl class="ctrlUnit">
        <dt><label for="ctrl_{$fieldMap.username}">{xen:phrase name}:</label></dt>
        <dd>
            <input type="text" name="{$fieldMap.username}" value="{$fields.username}" class="textCtrl" id="ctrl_{$fieldMap.username}" autofocus="true" autocomplete="off" />
            <p class="explain">{xen:phrase this_is_name_that_will_be_shown_with_your_messages}</p>
        </dd>
    </dl>

  

    <dl class="ctrlUnit">
        <dt><label for="ctrl_{$fieldMap.email}">{xen:phrase email}:</label></dt>
        <dd>
            <input type="email" name="{$fieldMap.email}" value="{$fields.email}" dir="ltr" class="textCtrl" id="ctrl_{$fieldMap.email}" />
        </dd>
    </dl>

    <fieldset>
      

        <dl class="ctrlUnit">
            <dt><label for="ctrl_{$fieldMap.password}">{xen:phrase password}:</label></dt>
            <dd><input type="password" name="{$fieldMap.password}" class="textCtrl OptOut" id="ctrl_{$fieldMap.password}" autocomplete="off" /></dd>
        </dl>

        <dl class="ctrlUnit">
            <dt><label for="ctrl_{$fieldMap.password_confirm}">{xen:phrase confirm_password}:</label></dt>
            <dd>
                <input type="password" name="{$fieldMap.password_confirm}" class="textCtrl OptOut" id="ctrl_{$fieldMap.password_confirm}" />
                <p class="explain">{xen:phrase enter_your_password_in_first_box_and_confirm_it_in_second}</p>
            </dd>
        </dl>

      
    </fieldset>
      
    <dl class="ctrlUnit">
        <dt>{xen:phrase gender}:</dt>
        <dd>
            <ul>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="male" {xen:checked "{$fields.gender} == 'male'"} /> {xen:phrase male}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="female" {xen:checked "{$fields.gender} == 'female'"} /> {xen:phrase female}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="" {xen:checked "!{$fields.gender}"} /> ({xen:phrase unspecified})</label></li>
            </ul>
        </dd>
    </dl>

    <xen:include template="helper_birthday_row_register" />


    <dl class="ctrlUnit submitUnit">
        <dt></dt>
        <dd>
            <xen:set var="$timerHtml"><xen:if is="{$xenOptions.registrationTimer}">
                <span id="RegTimer">({xen:phrase please_wait_x_seconds, "seconds=<span>{$xenOptions.registrationTimer}</span>"})</span>
            </xen:if></xen:set>
            <xen:if is="{$tosUrl}">
                <ul>
                    <li>
                        <div class="text">{xen:phrase i_agree_to_terms_and_rules, 'checkbox=<input type="checkbox" name="agree" value="1" id="ctrl_agree" class="Disabler" />', 'terms_attributes=href="{$tosUrl}" target="_blank"'}</div>
                        <ul id="ctrl_agree_Disabler">
                            <li><input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" id="SubmitButton" /> {xen:raw $timerHtml}</li>
                        </ul>                      
                    </li>
                </ul>
            <xen:else />
                <input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" id="SubmitButton" /> {xen:raw $timerHtml}
            </xen:if>
        </dd>
    </dl>

    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
    <input type="hidden" name="reg_key" value="{$regKey}" />
</form>

<xen:if is="{$xenOptions.registrationTimer}">
    <script>
    (function($) {
        $(function() {
            var rt = $('#RegTimer'), s = rt.find('span'), t = parseInt(s.text(), 10),
                sub = $('#SubmitButton'),
                i = setInterval(function() {
                    t--;
                    if (t <= 0) {
                        rt.hide();
                        clearInterval(i);
                    } else {
                        s.text(t);
                    }
                }, 1000);

                var f = function(e) {
                    if (t > 0) {
                        e.preventDefault();
                    }
                };

                sub.click(f);
                sub.closest('form').submit(f);
        });
    })(jQuery);
    </script>
</xen:if>
I tried your code, although when testing the form i am met with these errors:
upload_2014-11-8_22-34-6.png
 

rainmotorsports

Well-known member
#10
Using any 1.4 incompatible captcha's, registration form addon's are also an issue. Seen this on quite a few sites. Never know what that sites particular cause is though.
 
#11
Code:
<xen:title>{xen:phrase sign_up}</xen:title>

<form action="{xen:link 'register/register'}" method="post" class="xenForm AutoValidator"
    data-fieldValidatorUrl="{xen:link register/validate-field}"
    data-normalSubmit="1"
>
    <xen:if is="{$errors}">
        <div class="errorPanel">
            <h3 class="errorHeading">{xen:phrase please_correct_following_errors}:</h3>
            <div class="baseHtml errors">
                <ol>
                <xen:foreach loop="$errors" value="$error">
                    <li>{xen:raw $error}</li>
                </xen:foreach>
                </ol>
            </div>
        </div>
    </xen:if>

   

    <dl class="ctrlUnit">
        <dt><label for="ctrl_{$fieldMap.username}">{xen:phrase name}:</label></dt>
        <dd>
            <input type="text" name="{$fieldMap.username}" value="{$fields.username}" class="textCtrl" id="ctrl_{$fieldMap.username}" autofocus="true" autocomplete="off" />
            <p class="explain">{xen:phrase this_is_name_that_will_be_shown_with_your_messages}</p>
        </dd>
    </dl>

   

    <dl class="ctrlUnit">
        <dt><label for="ctrl_{$fieldMap.email}">{xen:phrase email}:</label></dt>
        <dd>
            <input type="email" name="{$fieldMap.email}" value="{$fields.email}" dir="ltr" class="textCtrl" id="ctrl_{$fieldMap.email}" />
        </dd>
    </dl>

    <fieldset>
       

        <dl class="ctrlUnit">
            <dt><label for="ctrl_{$fieldMap.password}">{xen:phrase password}:</label></dt>
            <dd><input type="password" name="{$fieldMap.password}" class="textCtrl OptOut" id="ctrl_{$fieldMap.password}" autocomplete="off" /></dd>
        </dl>

        <dl class="ctrlUnit">
            <dt><label for="ctrl_{$fieldMap.password_confirm}">{xen:phrase confirm_password}:</label></dt>
            <dd>
                <input type="password" name="{$fieldMap.password_confirm}" class="textCtrl OptOut" id="ctrl_{$fieldMap.password_confirm}" />
                <p class="explain">{xen:phrase enter_your_password_in_first_box_and_confirm_it_in_second}</p>
            </dd>
        </dl>

       
    </fieldset>
       
    <dl class="ctrlUnit">
        <dt>{xen:phrase gender}:</dt>
        <dd>
            <ul>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="male" {xen:checked "{$fields.gender} == 'male'"} /> {xen:phrase male}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="female" {xen:checked "{$fields.gender} == 'female'"} /> {xen:phrase female}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="" {xen:checked "!{$fields.gender}"} /> ({xen:phrase unspecified})</label></li>
            </ul>
        </dd>
    </dl>

    <xen:include template="helper_birthday_row_register" />

<xen:if is="{$xenOptions.registrationSetup.requireLocation}">
        <dl class="ctrlUnit">
            <dt>
                {xen:phrase location}:
                <dfn>{xen:phrase required}</dfn>
            </dt>
            <dd>
                <input type="text" name="location" value="{$fields.location}" class="textCtrl" />
            </dd>
        </dl>
    </xen:if>
   
    <dl class="ctrlUnit" style="display: none">
        <dt><label for="ctrl_{$fieldMap.timezone}">{xen:phrase time_zone}:</label></dt>
        <dd>
            <select name="{$fieldMap.timezone}" class="textCtrl {xen:if $fields.timezoneAuto, 'AutoTimeZone'} OptOut" id="ctrl_{$fieldMap.timezone}">
                <xen:foreach loop="$timeZones" key="$identifier" value="$name">
                    <option value="{$identifier}" {xen:selected "{$identifier} == {$fields.timezone}"}>{$name}</option>
                </xen:foreach>
            </select>
        </dd>
    </dl>

    <xen:if hascontent="true">
        <fieldset>
            <xen:contentcheck>
                <xen:include template="helper_captcha_unit" />
            </xen:contentcheck>
        </fieldset>
    </xen:if>
    <dl class="ctrlUnit submitUnit">
        <dt></dt>
        <dd>
            <xen:set var="$timerHtml"><xen:if is="{$xenOptions.registrationTimer}">
                <span id="RegTimer">({xen:phrase please_wait_x_seconds, "seconds=<span>{$xenOptions.registrationTimer}</span>"})</span>
            </xen:if></xen:set>
            <xen:if is="{$tosUrl}">
                <ul>
                    <li>
                        <div class="text">{xen:phrase i_agree_to_terms_and_rules, 'checkbox=<input type="checkbox" name="agree" value="1" id="ctrl_agree" class="Disabler" />', 'terms_attributes=href="{$tosUrl}" target="_blank"'}</div>
                        <ul id="ctrl_agree_Disabler">
                            <li><input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" id="SubmitButton" /> {xen:raw $timerHtml}</li>
                        </ul>                       
                    </li>
                </ul>
            <xen:else />
                <input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" id="SubmitButton" /> {xen:raw $timerHtml}
            </xen:if>
        </dd>
    </dl>

    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
    <input type="hidden" name="reg_key" value="{$regKey}" />
</form>

<xen:if is="{$xenOptions.registrationTimer}">
    <script>
    (function($) {
        $(function() {
            var rt = $('#RegTimer'), s = rt.find('span'), t = parseInt(s.text(), 10),
                sub = $('#SubmitButton'),
                i = setInterval(function() {
                    t--;
                    if (t <= 0) {
                        rt.hide();
                        clearInterval(i);
                    } else {
                        s.text(t);
                    }
                }, 1000);

                var f = function(e) {
                    if (t > 0) {
                        e.preventDefault();
                    }
                };

                sub.click(f);
                sub.closest('form').submit(f);
        });
    })(jQuery);
    </script>
</xen:if>
 
#12
Code:
<xen:title>{xen:phrase sign_up}</xen:title>

<form action="{xen:link 'register/register'}" method="post" class="xenForm AutoValidator"
    data-fieldValidatorUrl="{xen:link register/validate-field}"
    data-normalSubmit="1"
>
    <xen:if is="{$errors}">
        <div class="errorPanel">
            <h3 class="errorHeading">{xen:phrase please_correct_following_errors}:</h3>
            <div class="baseHtml errors">
                <ol>
                <xen:foreach loop="$errors" value="$error">
                    <li>{xen:raw $error}</li>
                </xen:foreach>
                </ol>
            </div>
        </div>
    </xen:if>

  

    <dl class="ctrlUnit">
        <dt><label for="ctrl_{$fieldMap.username}">{xen:phrase name}:</label></dt>
        <dd>
            <input type="text" name="{$fieldMap.username}" value="{$fields.username}" class="textCtrl" id="ctrl_{$fieldMap.username}" autofocus="true" autocomplete="off" />
            <p class="explain">{xen:phrase this_is_name_that_will_be_shown_with_your_messages}</p>
        </dd>
    </dl>

  

    <dl class="ctrlUnit">
        <dt><label for="ctrl_{$fieldMap.email}">{xen:phrase email}:</label></dt>
        <dd>
            <input type="email" name="{$fieldMap.email}" value="{$fields.email}" dir="ltr" class="textCtrl" id="ctrl_{$fieldMap.email}" />
        </dd>
    </dl>

    <fieldset>
      

        <dl class="ctrlUnit">
            <dt><label for="ctrl_{$fieldMap.password}">{xen:phrase password}:</label></dt>
            <dd><input type="password" name="{$fieldMap.password}" class="textCtrl OptOut" id="ctrl_{$fieldMap.password}" autocomplete="off" /></dd>
        </dl>

        <dl class="ctrlUnit">
            <dt><label for="ctrl_{$fieldMap.password_confirm}">{xen:phrase confirm_password}:</label></dt>
            <dd>
                <input type="password" name="{$fieldMap.password_confirm}" class="textCtrl OptOut" id="ctrl_{$fieldMap.password_confirm}" />
                <p class="explain">{xen:phrase enter_your_password_in_first_box_and_confirm_it_in_second}</p>
            </dd>
        </dl>

      
    </fieldset>
      
    <dl class="ctrlUnit">
        <dt>{xen:phrase gender}:</dt>
        <dd>
            <ul>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="male" {xen:checked "{$fields.gender} == 'male'"} /> {xen:phrase male}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="female" {xen:checked "{$fields.gender} == 'female'"} /> {xen:phrase female}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="" {xen:checked "!{$fields.gender}"} /> ({xen:phrase unspecified})</label></li>
            </ul>
        </dd>
    </dl>

    <xen:include template="helper_birthday_row_register" />

<xen:if is="{$xenOptions.registrationSetup.requireLocation}">
        <dl class="ctrlUnit">
            <dt>
                {xen:phrase location}:
                <dfn>{xen:phrase required}</dfn>
            </dt>
            <dd>
                <input type="text" name="location" value="{$fields.location}" class="textCtrl" />
            </dd>
        </dl>
    </xen:if>
  
    <dl class="ctrlUnit" style="display: none">
        <dt><label for="ctrl_{$fieldMap.timezone}">{xen:phrase time_zone}:</label></dt>
        <dd>
            <select name="{$fieldMap.timezone}" class="textCtrl {xen:if $fields.timezoneAuto, 'AutoTimeZone'} OptOut" id="ctrl_{$fieldMap.timezone}">
                <xen:foreach loop="$timeZones" key="$identifier" value="$name">
                    <option value="{$identifier}" {xen:selected "{$identifier} == {$fields.timezone}"}>{$name}</option>
                </xen:foreach>
            </select>
        </dd>
    </dl>

    <xen:if hascontent="true">
        <fieldset>
            <xen:contentcheck>
                <xen:include template="helper_captcha_unit" />
            </xen:contentcheck>
        </fieldset>
    </xen:if>
    <dl class="ctrlUnit submitUnit">
        <dt></dt>
        <dd>
            <xen:set var="$timerHtml"><xen:if is="{$xenOptions.registrationTimer}">
                <span id="RegTimer">({xen:phrase please_wait_x_seconds, "seconds=<span>{$xenOptions.registrationTimer}</span>"})</span>
            </xen:if></xen:set>
            <xen:if is="{$tosUrl}">
                <ul>
                    <li>
                        <div class="text">{xen:phrase i_agree_to_terms_and_rules, 'checkbox=<input type="checkbox" name="agree" value="1" id="ctrl_agree" class="Disabler" />', 'terms_attributes=href="{$tosUrl}" target="_blank"'}</div>
                        <ul id="ctrl_agree_Disabler">
                            <li><input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" id="SubmitButton" /> {xen:raw $timerHtml}</li>
                        </ul>                      
                    </li>
                </ul>
            <xen:else />
                <input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" id="SubmitButton" /> {xen:raw $timerHtml}
            </xen:if>
        </dd>
    </dl>

    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
    <input type="hidden" name="reg_key" value="{$regKey}" />
</form>

<xen:if is="{$xenOptions.registrationTimer}">
    <script>
    (function($) {
        $(function() {
            var rt = $('#RegTimer'), s = rt.find('span'), t = parseInt(s.text(), 10),
                sub = $('#SubmitButton'),
                i = setInterval(function() {
                    t--;
                    if (t <= 0) {
                        rt.hide();
                        clearInterval(i);
                    } else {
                        s.text(t);
                    }
                }, 1000);

                var f = function(e) {
                    if (t > 0) {
                        e.preventDefault();
                    }
                };

                sub.click(f);
                sub.closest('form').submit(f);
        });
    })(jQuery);
    </script>
</xen:if>
This works, although it doesnt show custom fields? Was that intentional?