add hidden input for id trait and convert values when setting