# Before insert hook help

**URL:** <https://forum.wixstudio.com/t/before-insert-hook-help/40445>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [August 23, 2020, 4:37pm UTC](https://forum.wixstudio.com/t/before-insert-hook-help/40445 "2020-08-23T16:37:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bensamuel1976](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bensamuel1976/32/20096_2.png) [@bensamuel1976](https://forum.wixstudio.com/u/bensamuel1976)\
**Post date:** [August 23, 2020, 4:37pm UTC](https://forum.wixstudio.com/t/before-insert-hook-help/40445/1 "2020-08-23T16:37:39Z")

</div>

Hi.

I have a database set up and connected to a form. All working perfect. The issue I have is one of the fields on the form is a payment field (url) where the user enters their PayPal url. When the user enters the payment url they have to enter the full url [https://www.paypal.me/userid](https://www.paypal.me/userid) . The problem is most users just enter www.paypal.me/userid and forget to enter the https:// which means the button on the frontend profile does not work.

I believe if I add a beforeinsert hook I can either add the https:// or [https://www.paypal.me/](https://www.paypal.me/) in front of what the user has entered. This would then only require the user to enter their PayPal handle.

I have looked at examples of beforeinsert code however cannot find any example that shows how to add in front of what the user entered. I can find how to replace what the user entered but that is not what I need. Any help would be greatly appreciated.

Thanks in advance.
