Bouncing Code - Best Model?

I am trying to fix some issues with a database applications I am creating. It has a popup that allows you to enter information and some of it is dynamic, which if you change a dropdown the modal changes.

I am noticing though that no matter what model i choose, Gemini Pro, it doesnt fix the issue.

Is there a model that you suggest i use? I am going around in circles at the moment.