How do I add a Text Input on the Product Details page as Variant. I need the Buyer to mention his custom Caption

How do I add a Text Input on the Product Details page as Variant. I need the Buyer to mention his custom Caption. It should be there in the invoice also.