Refactored prompt form and related logic