How to use forms from an external url

I’m using Bonita Studio 7.6.2 and i want to use forms from external url in my human tasks, so I found that for a human task to use external forms instead of the UI Designer one, I have to

Select the Human Task
Go to Details panel
Click on Execution tab
    Select Forms pane
Select External URL radio button
Enter the URL (in my case i have a form in a .php file).

So, my form is rendered correctly, however I do not know how to make the submit button execute or release the task when doing what I do. I intuit that I must use the api of BonitaBPM, however, I do not know what is the correct request and in any case, I suppose that this will ask me the id of the task or case to be released (so that the next task is executed) and not how to get those two parameters

Hello,
Yes, you’ll need to use a REST API and provide the id of the task along with any data needed to fulfill a contract. For more information see:

https://documentation.bonitasoft.com/bonita/7.6/bpm-api

Under UserTask

You should be able to get the id of the task using a script and sending it to the external form

what script to get the task id?