Dynamic form resizing