I have created a Product Kit, where I utilize dropdown boxes and radio buttons as components. I would like to have the customer enter some text that is needed for the order, but don't see a way to do it.
Is there any way to get some input text from the user specific to a product?
Thanks
Add Input Textbox field for a component in a Product Kit
Re: Add Input Textbox field for a component in a Product Kit
You can create a product template with a customer field of type textbox. Then apply that template to the desired product for which you want to have the input field.
Re: Add Input Textbox field for a component in a Product Kit
Thanks for the response! I did that and the text box shows up, but is there a way to format/align it better. It kind of looks weird in the display next to the other components. For example, the label is on one line and the textbox on the other. It would be nice for both to be on the same line, like the other components.
What files would I have to modify to format these fields better.
What files would I have to modify to format these fields better.
Re: Add Input Textbox field for a component in a Product Kit
For this you need a small modification in App_Code/ProductHelper.cs file. Edit the file and locate the public static void BuildProductChoices(Product product, PlaceHolder phChoices) function. Then find the following line of code in this function
and make it look like
Save the changes and test again the product details page.
Code: Select all
phChoices.Controls.Add(new LiteralControl((input.UserPrompt + "<br />")));
Code: Select all
phChoices.Controls.Add(new LiteralControl((input.UserPrompt + " : ")));