Aaaah, the separation of server side and client side processing.
The php does it's stuff and creates the text boxes and radio buttons in an html document and sends them to browser and then forgets all about it.
The user fills in the form and there are events called which use Javascript. JS doesn't care how the form got on the screen, it just does it's job. The form could be hardcoded or generated, no diff.
The only time you need to worry about the form being generated by PHP is where something hasn't be written properly and you need to change the source. Just write the javascript as you would for any other form.
I would, however, recommend that the javascript be kept in a linked file, not in the generated page, but that is a personal preference.