Added javascript to add extra fields