Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui-react] it should be easy to add custom fields in SignUp form in hosted UI #248

Closed
dfang opened this issue Aug 19, 2020 · 3 comments
Closed
Labels
Authenticator An issue or a feature-request for an Authenticator UI Component feature-request Request a new feature

Comments

@dfang
Copy link

dfang commented Aug 19, 2020

Is your feature request related to a problem? Please describe.
I'm always frustrated when i want to add a simple custom field (role with select or radio button) to sign up field with HOSTED REACT UI.

Describe the solution you'd like
easy to add any custom field type to sign up or sign in form

Describe alternatives you've considered
i try to extend AmplifySignout in my custom_signup.jsx, but i got this error

class CustomSignUp extends AmplifySignUp 

TypeError: Class extends value #<Object> is not a constructor or null

Additional context
Add any other context, an idea of the implementation or screenshots about the feature request here.

<AmplifyAuthenticator>
          <CustomSignUp />
          <AmplifySignUp
            slot="sign-up"
            usernameAlias="email"
            formFields={[
              // { type: "username" },
              { type: "email" },
              { type: "password" },
              {
                type: "custom:role",
                label: "Custom Role Label",
                key: "custom:role",
                placeholder: "custom Phone placeholder",
                required: false,
              }
            ]}
          />
        </AmplifyAuthenticator>

it's easy to add custom field to Sign Up Form, but that field can only be input, but what if i want a select or a radio button group ? it seems it can't be customized,

@tomyitav
Copy link

tomyitav commented Oct 2, 2020

+1, having a select on the SignUp page will be very helpful

@hkjpotato
Copy link

related https:/aws-amplify/amplify-js/issues/7937. Feature request for supporting customized form field (other than Input)

@ErikCH ErikCH transferred this issue from aws-amplify/amplify-js Aug 25, 2021
@ErikCH ErikCH added the feature-request Request a new feature label Aug 25, 2021
@ericclemmons ericclemmons added the Authenticator An issue or a feature-request for an Authenticator UI Component label Oct 6, 2021
@ericclemmons
Copy link
Contributor

I just documented an example that specifically adds a custom field (preferred_username) for our @next release (see #552):

https://ui.docs.amplify.aws/ui/components/authenticator?platform=react#sign-up-fields

To be clear, this is for customizing the Authenticator's sign-up field – not Cognito Hosted UI. (That's not possible via this library and can only be done by the Cognito service team)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authenticator An issue or a feature-request for an Authenticator UI Component feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

5 participants