Functions to map formdata and db, from db create rule, summary fixes and
object approach for when