We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15404
    • 14 Posts
    HELLO i hope some can help me with this... i try to add extra fields into the user register form with out any luck for example i need to get more info wen the user register in my webpage:
    like phone number, id...... not just user name, full name and pass i using this code i try to add like extra color filds... thanks in advance

    <h2>Register</h2>
     
    [[!Register?
        &submitVar=`registerbtn`
        &activationResourceId=`12`
        &activationEmailTpl=`myActivationEmailTpl`
        &activationEmailSubject=`Thanks for Registering!`
        &submittedResourceId=`45`
        &usergroups=`Marketing,Research`
        &validate=`nospam:blank,
      username:required:minLength=^6^,
      password:required:minLength=^6^,
      password_confirm:password_confirm=^password^,
      fullname:required,
      phone:required,
      email:required:email`
        &placeholderPrefix=`reg.`
    ]]
    
    <div class="register">
        <div class="registerMessage">[[!+reg.error.message]]</div>
     
    <label>Favorite Color:
    <span class="error">[[+error.color]]</span>
    <input type="text" name="color:required" value="[[+color]]" />
    </label>
    
    
        <form class="form" action="[[~[[*id]]]]" method="post">
    
     <label for="phone">[[%register.phone]]
                <span class="error">[[!+reg.error.phone]]</span>
            </label>
            <input type="text" name="phone" id="phone" value="[[!+reg.phone]]" />
    
    
    
            <input type="hidden" name="nospam" value="[[!+reg.nospam]]" />
     
            <label for="username">[[%register.username? &namespace=`login` &topic=`register`]]
                <span class="error">[[!+reg.error.username]]</span>
            </label>
            <input type="text" name="username" id="username" value="[[!+reg.username]]" />
     
            <label for="password">[[%register.password]]
                <span class="error">[[!+reg.error.password]]</span>
            </label>
            <input type="password" name="password" id="password" value="[[!+reg.password]]" />
     
            <label for="password_confirm">[[%register.password_confirm]]
                <span class="error">[[!+reg.error.password_confirm]]</span>
            </label>
            <input type="password" name="password_confirm" id="password_confirm" value="[[!+reg.password_confirm]]" />
     
            <label for="fullname">[[%register.fullname]]
                <span class="error">[[!+reg.error.fullname]]</span>
            </label>
            <input type="text" name="fullname" id="fullname" value="[[!+reg.fullname]]" />
     
            <label for="email">[[%register.email]]
                <span class="error">[[!+reg.error.email]]</span>
            </label>
            <input type="text" name="email" id="email" value="[[!+reg.email]]" />
     
            <br class="clear" />
     
            <div class="form-buttons">
                <input type="submit" name="registerbtn" value="Register" />
            </div>
        </form>
    </div>