Updated form generation api