Fix javascript to find correct form chooser element