show selected attribute when field is required