Hi, is there a way to order custom form fields on signup (e.g. have name then email then password)?
n
Hi, is there a way to order custom form fields on signup (e.g. have name then email then password)?
r
hey @nickm91.
yes there is. Give me a min
n
Copy code
override: {
        components: {
          EmailPasswordSignUpForm_Override: ({
            DefaultComponent,
            ...props
          }) => {
            return <div>HELLO WORLD</div>;
          },
        },
      },
Seems your PR is still open so they change you've suggested wont work. Looking at the comment you link to in the PR - that implementation doesnt work any more either. Also the interface has changed to
EmailPasswordSignUpForm_Override
. However I would expect this to be the Auth Signup Component to now just render hello world, but this override doesn't seem to do any replacement of the form
r
So the PR is open, but the method in the comment should work. Overriding components should work as well - did you check the name of the component from the react component inspector in inspect element?
The reason the PR is open is cause the css based method is not an ideal way of doing the reorder. But it does work
n
You can see it's not rendering the override
r
can you make sure that it builds and is not cached or something?
just tried it. Seems to work fine with the latest version of the SDK
n
Yeah it seemed the config was not getting picked for hot reload in the build
Copy code
EmailPasswordSignUp_Override: ({ DefaultComponent, ...props }) => {
            return (
              <DefaultComponent
                {...props}
                formFields={[
                  props.formFields.find(({id}) => id === 'name'),
                  props.formFields.find(({id}) => id === 'email'),
                  props.formFields.find(({id}) => id === 'password'),
                ]}
              />
            );
          },
This less css hack solution works nicely for me
r
hmm. Interesting! This is actually nice. Could you please comment this in the issue above?
n
Sure can!
r
thank you
n