Lock: Additional Signup Fields do not render

Created on 31 Mar 2016  路  6Comments  路  Source: auth0/lock

When adding additional fields with:

additionalSignUpFields: [{
  name: "address",
  icon: "https://example.com/assests/address_icon.png",
  placeholder: "enter your address",
  validator: function(address) {
    return address.length > 10;
  }
}]

as per the example, nothing is shown.

Most helpful comment

Hi @dharness, the options are provided to the constructor in the new version:

var lock = new Auth0Lock(clientId, domain, options);
lock.show();

We also renamed some options you are using (hoping to make their meaning clearer):

  • allowSignUpAction was renamed allowSignUp.
  • socialBigButtons was replaced by socialButtonStyle which takes either "big" or "small".

All 6 comments

Hi @dharness, the options are provided to the constructor in the new version:

var lock = new Auth0Lock(clientId, domain, options);
lock.show();

We also renamed some options you are using (hoping to make their meaning clearer):

  • allowSignUpAction was renamed allowSignUp.
  • socialBigButtons was replaced by socialButtonStyle which takes either "big" or "small".

@gnandretta tremendous help! Thank you!

I'm having the same problem. I can't get the custom signup fields to show. Here is the code I am using:

    var options = {
        'theme': {
            'logo': 'img/Icons-big.png'
        },
        'container': 'auth0_form',
        'auth': {
            'redirectUrl': '<omitted>'
        },
        'additionalSignupFields': [{
            name: "address",
            icon: "img/address_icon.png",
            placeholder: "enter your address",
            validator: function(address) {
                return address.length > 10;
            }
        }]
    };

var lock = new Auth0Lock('', '.auth0.com', options);
lock.show();

Hi @protege527,

Option names are case sensitive, try with additionalSignUpFields (capital U)

That was it. It's works great. The property was added to the user metadata as expected. Thanks!

Can I add other types such as radio and number,,,,
I tried but it doesn't work.
'additionalSignUpFields': [{
type: 'radio',
name: "gender",
icon: "img/address_icon.png",
placeholder: "your gender",
options: [
{value: "male", label: "Male"},
{value: "female", label: "FeMale"},
],
}]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcrawshaw picture mcrawshaw  路  5Comments

kjartanvalur picture kjartanvalur  路  8Comments

dszmaj picture dszmaj  路  3Comments

virgil-av picture virgil-av  路  5Comments

fernandomunizz89 picture fernandomunizz89  路  3Comments