javascript to tell form which entry tags should be added to