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

XF 1.5 How the Remove Date of Birth from Registration Page

Discussion in 'Styling and Customization Questions' started by Carlo, Oct 9, 2015.

  1. Carlo

    Carlo Member

    This question might have been asked before but I couldn't find an answer yet. Under User Registration, I have already unchecked "Require Date of Birth and Minimum Age" however during registration, the field still appears. I want to remove it completely, both from normal registration and facebook registration.

    Is this possible without using add-ons?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Carlo

    Carlo Member

    Got it to work! Thanks Brogan.
    The sticky thread "How to change almost anything quickly and easily" was very helpful. Thanks Erik for the great video!
     
  4. AndyB

    AndyB Well-Known Member

  5. Carlo

    Carlo Member

    Thanks AndyB, I saw that add-on earlier. I needed to have the date of birth removed from FB and Linkedin (added via External Accounts Extended add-on) registration as well. I realized that it would only work for normal registrations as mentioned in the FAQ.

    The solution I did was to comment out the entire helper_birthday_row_register. It may not be the most elegant solution but so far its working although I haven't tested it extensively.
     
  6. AndyB

    AndyB Well-Known Member

    A perfect solution, Carlo.

    I just updated Remove Date Of Birth v1.2.

    https://xenforo.com/community/resources/remove-date-of-birth.2849/

    Thank you.
     
  7. Carlo

    Carlo Member

    I did a minor modification to the template by inserting an if clause:
    Code:
    <xen:if is="{$dobRequired}">
    
        <dl class="ctrlUnit OptOut">
            <dt>
                {xen:phrase date_of_birth}:
                <xen:if is="{$dobRequired}"><dfn>{xen:phrase required}</dfn></xen:if>
            </dt>
            <dd>
                <xen:include template="helper_birthday_input">
                    <xen:map from="$fields" to="$user" />
                </xen:include>
            </dd>
        </dl>
    
    <xen:else />
        <xen:comment>Remove Date Of Birth</xen:comment>
    </xen:if>
    This allowed the date of birth field to appear/disappear depending on what was selected in the user registration options. Thanks for your input - I don't know how to code or use templates but these addons let me learn my way around!
     

Share This Page