Open denxorz opened 1 year ago
Hi @denxorz - There currently isn't a great way to achieve this. It can be achieved with Full UI Customization, but this is not trivial. You would need to build a completely custom sign up form with a custom username/email field and a custom sign up button. I will include an example of what that might look like below.
I will label this as a feature request.
@Jordan-Nelson thanks for the help. I will try out the workaround.
Replaced the FilledButton
by the following, so that the visuals/translations/isBusy-behavior is the same.
CustomSignUpButton((context, state) {
state.username = initialUsernameValue;
state.email = initialEmailValue;
}),
class CustomSignUpButton extends SignUpButton {
const CustomSignUpButton(this.customOnPressed, {Key? key}) : super(key: key);
final void Function(
BuildContext context,
AuthenticatorState state,
) customOnPressed;
@override
void onPressed(BuildContext context, AuthenticatorState state) {
customOnPressed(context, state);
super.onPressed(context, state);
}
}
Couldn't do the same for the field, because most of it is 'private'.
Description
In our app users are added by invites. To simply the Sign up process we want to prefill certain fields with data from the invite, like username and email. Is it possbile to do this somehow?
It would also be nice to have the ability to disable the fields that are already filled.
Categories
Steps to Reproduce
No response
Screenshots
No response
Platforms
Flutter Version
3.13.1
Amplify Flutter Version
1.4.0
Deployment Method
Custom Pipeline
Schema
No response