When modifying the signInUp form as described in t...
# support-questions-legacy
j
When modifying the signInUp form as described in the guide in the link, is it then possible to add a validation function that checks that the value of two fields are equal? For example for verifying that the user typed the correct password, they have to type it twice. (same with email) https://supertokens.com/docs/emailpassword/common-customizations/signup-form/field-validators
r
Hey?
!
Yea. It is possible
In your custom validator function, just use JS to find the other form field and read the value of that.
j
document.getElementById ?
or how can I grab the other field?
r
See this file
For example on line 116
j
alright thanks. Is it possible for me to give an ID to the html element?
r
Well, you can, but you will have to use JS for that to dynamically give it an ID
but I guess that beats the point of giving it an ID
j
^^
yeah I will go with the approach you provided
Do you have feature for sending an activation email to a new user? Such that they are only registered if they click the activate button in the email? 😄
r
There isn’t an explicit flow like that. But you could make one. Enable email verification recipe first, and then setup a cronjob which loops through all users and deletes them if they haven’t verified their email after certain amount of time
j
^^alright
When I add custom fields to the signup form can i Specify what kind of input field they are
r
Not really. At the moment, we only allow for text input
You could always override the whole component and inject your custom type using JS. Or just make a custom form entirely
j
Alright, good to know. Thanks for the support as always!
Do you have some documentation on making a custom form?
Or do you have an event that fires when the signup form is ready (has been rendered)?
r
You can checkout the override react component docs and override the sign up form, and add a useEffect in there