Want to create a "referral" form and give points to the contact that submits it

So I want to create a process whereby a contact in my mautic system can submit a form and create a referral. That referral becomes a new contact in the system. I want to award the person who submits the form 10 points. What I have now is giving the 10 points to the new contact being created and not the one that submitted it. I think it’s because the form uses the “email” field for the new contact and a “referred_by” custom field for the one doing the referring. I think the system is giving the points to the only field it know what to do with – the email field.

I’m thinking the only way to accomplish this is create a form where “email” is the person submitting the form (so they get the 10 points) and the “new_name” and “new_email” get sent off via PHP, JS, something, to an API call to create the new contact via API but I’m not sure how to do it or even if that’s the right strategy.

Would appreciate some guidance on a good path forward.