Web form crashes when link field has too many records

Hello everyone,

I´m having an issue with a web form. I´m using it for people to fill in order to apply to a job. One of the fields is for the city where the person lives. The type of the field is link, linking to an existing Doctype where cities are listed. The web form has a custom script attached to it for some functionality but crashes when this link field is in there. If I delete it, the web form works flawlessly. If instead of deleting, I select another Doctype (with few records/entries) as the link it continues to work. I tried replicating the issue with other doctypes with a lot of records like Purchase Order and it failed again. I can´t find the reason of this behaviour. Any advise?

Thanks