Add fields to sign up?

I’m setting up a Mastodon instance and am trying to add some additional fields to the registration page, however I am getting an error each time I try to put the new f.input field into the sign up haml page, has anyone done this or possibly have an idea as to where I am going wrong?

Note: The current issue appears to be a front end error, I have had no issues with altering the table schema to include these fields and I have not made any alterations to the backend queries yet, my issue is that the sign up page shows an error when I include the new field, but will work again if it’s removed or changed to an existing field (ex. locale).

This is resolved, I was able to fix the rendering error by adding the new input fields to the attr_accessor section of /app/models/user.rb

Just wanted to share in case anyone else runs into this :slight_smile:

1 Like

Out of curiosity, what kind of fields were you adding and have you considered making a patch?

@weex So far we’ve added first and last name fields as well as phone number input (all optional), we are also considering a birth date field as extra verification that users are at least 13 years old.

I haven’t thought to submit this as a patch, but I’m certainly not opposed to it if it’s something that may help out others as well.

1 Like

I can see how others might wish to do such a simple extension but wouldn’t have the tech knowhow to do it. Yes, it raises questions of supportability and if the info needs to be federated but those aren’t necessarily problems and could be dealt with if they were.