Substitute signup_form with my own signup form

Hi, I use anvil.users.login_with_form() login, that is no problem, great! however, I wish use my own signup_form(), all other functions in this service all same without changing, how can I do that?

You could clone this custom login app and mod it for your own purposes :

or, if like me you don’t need the sign up features, I just use my own form and call the relevant API calls. I’ll get an example to you later (I’m just heading out the door).

Hi, David, I watched this tutorial and run it locally, I know when I click signup, it would open the default signup_form, but I wish I could substitute default signup_form with my own form, because I have other fields needed to be filled out in signup. Can I do that?

If not, is there other way allowing me send out confirm email without using default signup_form? and then received confirm?

The custom example loads up a custom signup form (“SignupDialog”) which you could modify to include your own fields.

It uses the google API to send out a mail, but you could substitute that for the “Email” service (Anvil | Reference).

Unless I’m misunderstanding your requirements?

Yes, that’s what I thought, but how? this form belongs to the app of “custom sign_up flow”, even though I just copy it to my app, when I call the function of ‘anvil.users.login_with_form()’ ,it open login in form


that’s no problem , but then click"Sign up for a new account", it still goes with the default one,
.

can I use command to accomplish substitution by using "anvil.user’?

I also try to use the command of

anvil.users.signup_with_form(‘Register’,allow_cancel=True)#Register is my signup form

but I failed, it still open default signup form.

It sounds like you’re opening the standard login form, and then clicking the signup form will open the standard one. You can’t open the custom form with the standard API calls.

In the custom flow example app, you call :

login_flow.login_with_form()

instead.

It’s not possible (as far as I know) to have the standard API call different forms - you have to replace those API calls with calls to your own forms, and that’s what the sample app does.

Once you have logged a person in, then the standard calls like anvil.users.get_user() will work, but you must use the calls to custom forms to create and login the user.

Does that make sense?

hi, I already successfully send out an confirm email with my own sign_up_form, but I didn’t get feed back from link. I mean, as test, after I sign-up, I received an email from my app, but I didn’t get comfired_email return True from this link, instead, I was redirected to my app immediately.
However , when I try to login, I still was suggested ‘Email not confirmed…’, also, in my data table, confirmed_email still was unchecked.