Two Different SignUp Form. Form A And Form B with different Fields


#1

Hi Everyone,
I am currently using Meteor account package useraccount to create two different types of accounts using two different sign up form.

The problem I’m facing is, with Form A I can successfully signup but with Form B, it keeps showing me that username is already used or Password may not be empty.

All my fields are set to required.

Is there any way i can make them work. :thinking:
Please Helps


#2

Your question sounds like a black box. It hurts my brain to read it. Haha. Just kidding.


#3

How should i improve it :joy: @minhna


#4

Even though there are 2 signup forms, users will end up in the same collection and usernames and emails should be unique. There is not really a way around this with the users functionality of Meteor unless you merge the information of one signup form with the other.

I did this by showing users that they are already part of another app from the same company and they simoly have to fill in some additional info. This would send them a mail to verify and they would be allowed to continue


#5

Thank you so much @cloudspider

Before rendering the Form B signUp, can we remove Form A emails and username and password, account template fields.

If this is possible then, i think Form B will function successfully. But How? :thinking:


#6

Well, you will need to show to the user that its the same app. Then show them the login and when they are logged in, you can leave out the fields that were filled in and prompt them with the leftover fields :slight_smile:


#7

This is really nice and smart @cloudspider but my design is such that Users Of Form A and Users of Form B can’t have both accounts.

I want A to be A with an id and different fields
I want B to be B with an id and different fields.

Also i successful created the fields of form B in mongo but doesn’t seem to save the form value also password may not be empty keep popping up. :thinking::confused::cry:

Please Help
Thank you so much for your help.
I appreciate it.


#8

Password can’t be empty when calling createUser from the client, so you can just create a method that calls it on the server.


#9

Thank you @copleykj. Can you please show me a sample code how i should call it from the server.

When i tried to call it from the server here is the message about it:

Exception while invoking method ‘accountUser’ Error: Accounts.createUser with callback not supported on the server yet.


#10

I successfully solved this issues by creating only one form id and change the form’s field on User A And User B so Useraccount only recognize that form.

Pretty amazing!!! :joy::joy::joy: