Submit specific form with CMenu link

I have a user entry form. For the delete button I have been using code like this:

'linkOptions'=>array('confirm'=>'Are you sure you want to delete this item?', 'submit'=>array('delete','id'=>$model->id))

However now I need to add a search form that appears before the user entry form. This means that the above code will not work as it is designed to submit the first form, form[0]. I thought there would be a simple interface to specify which form to submit with the delete button but I haven’t found it yet. I did find the below code and tried to integrate it into mine.


I don’t know if this is correct but it seemed that I should remove the “submit” portion and replace it with the onClick.

'linkOptions'=>array('confirm'=>'Are you sure you want to delete this item?', 'onClick'=>'$("#IdOfTheForm").submit()')

However the only thing output in the jquery section of the source at the bottom of the page is the confirm function. The onclick event to submit the form is not present. Also it doesn’t have the id of the record to pass to the delete function in the controller.

How do I combine submitting a specific form with a confirm message?

Thank you,