Help putting code into async and wait...

Yes that’s what wix are telling me yes the submit button is working before the code apparently so they recommend i switch to code i just dont know how to do it.

I have a diet creator which when i create a diet all data should go into the data base. this has been fine for 3 years now but apparently wix have update the rendering their end which has now stopped my site working and left me to fix it which is very good!!! expect i don’t know how to fix it hence Im here.

My site has been down 3 weeks now and I’ve lost a lot of business because of this,

Any way the code Im using to set field values. is as above i just need to know how to set this up with the A sync included in the code and the page redirecting after its submitted.

Id even be willing to pay someone to help me fix this im in need so badly.

Here is the full code for the page however the issue is around the Submit_OnClick function only and setting the fields. as i said before it was working fine until wix changed the rendering their end.

I cannot publish the full code here as its too big