# Additional fields for a custom Sign up form

**URL:** <https://community.auth0.com/t/additional-fields-for-a-custom-sign-up-form/51807>\
**Category:** Get Help\
**Tags:** signup, auth0\
**Created:** [October 19, 2020, 5:55pm UTC](https://community.auth0.com/t/additional-fields-for-a-custom-sign-up-form/51807 "2020-10-19T17:55:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MIPS](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mips/32/14222_2.png) [@MIPS](https://community.auth0.com/u/MIPS)\
**Post date:** [October 19, 2020, 5:55pm UTC](https://community.auth0.com/t/additional-fields-for-a-custom-sign-up-form/51807/1 "2020-10-19T17:55:26Z")

</div>

Hello, I am trying to add additional fields to my sign up form. What I am trying to do is add phone, address, full name and checkbox tag information.

I have looked at the documentation with Lock and other ways, but it is really unclear how to do this. I am using a fully custom build form that works with sign up/login. I have looked at the lock code

```auto
dditionalSignUpFields: [{
    name: "address",
    placeholder: "enter your address",
    // The following properties are optional
    icon: "https://example.com/assests/address_icon.png",
    prefill: "street 123",
    validator: function(address) {
      return {
         valid: address.length >= 10,
         hint: "Must have 10 or more chars" // optional
      };
    }
  },
  {
    name: "full_name",
    placeholder: "Enter your full name"
  }]

```

but don’t know how to add it here ( to the signup function)

```auto
   function signup() {
        var button = this;
        var email = document.getElementById('email').value;
        var password = document.getElementById('password').value;

        button.disabled = true;
        
        webAuth.redirect.signupAndLogin({
          connection: databaseConnection,
          email: email,
          password: password,
          captcha: captcha.getValue()
        }, function(err) {
          if (err) displayError(err);
          button.disabled = false;
        });
      }

```

I am just looking for a way to add additional sign up fields to my form, to be sent to the backend.  
An example code would be very helpful.

Thank you.

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [October 20, 2020, 1:57am UTC](https://community.auth0.com/t/additional-fields-for-a-custom-sign-up-form/51807/2 "2020-10-20T01:57:46Z")

</div>

Hey @MIPS,

Have you checked out the following function:  
[https://auth0.com/docs/libraries/auth0js#signup](https://auth0.com/docs/libraries/auth0js#signup)

Regards,  
Sidharth Chaudhary

---

<div class="post-metadata">

**Author:** ![MIPS](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mips/32/14222_2.png) [@MIPS](https://community.auth0.com/u/MIPS)\
**Post date:** [October 20, 2020, 9:32am UTC](https://community.auth0.com/t/additional-fields-for-a-custom-sign-up-form/51807/3 "2020-10-20T09:32:36Z")

</div>

Thank you very much, that was exactly what I was looking for, I have implemeted everything and it works. I also have another last question, I tried sending an array as a metadata, but got an error only string can be metadata.

Is it possible to send an array as metadata { mynames: [‘first’,‘second’] }

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 26, 2020, 1:08pm UTC](https://community.auth0.com/t/additional-fields-for-a-custom-sign-up-form/51807/6 "2020-10-26T13:08:18Z")

</div>

Previous message deleted due to SPAM reasons.
