I have a database that collects certain information from a user when they fill out a registration form using a custom registration form. I also have code that will create a unique referral code based on the users ID after they register. I need to update my database for that user with the generated referral code when they submit the registration form.
As you can see this poses a Chicken/Egg problem. Until the user completes registration and wix assigns the user ID, my code can't generate the referral code so how do i add the needed information to the database when i don't have the information until after they register?