Deduplicate form and input code