Collect other fields during sign-up process using the new Universal Login Page

I found this thread that explains that you can with a code snippet. However, I’m not sure where it goes.

Would love an answer to this question!

Thank you