I’m trying to us a drop down list for the qty in QuoteValet, so I can restrict the client to a set of specific quantities.
Looking at the resultant html when using a textbox, it uses a name of DI_QtyBase___n, where n is the line number starting from 0.
So I have the following code to create a dropdown list for the first line on the quote.
<select name="DI_QtyBase___0" id="DI_QtyBase___0" type="number">
What’s happening is that is appending the selected value to the existing value.
What’s even more strange, is if I have more than one product, ie I have 3 products with qty’s of 1, 1 & 2, and have the select box on the first product, and change the 1 to a 3 I get 1312.
Anyone have any ideas?
You can use the "InputType=DropDownList" macro attribute to accomplish this.
In your example I believe the following should do it for you:
Thanks, I'll give that a try
this doesn't work. See screenshot.
It just displays the text of the macro, and doesn't convert it. However it does convert the values make up the list.
<td class="col-qty" update-qty="[DI_CustomText20]"> <!-- Display Qty in textbox when CustomText20 is flagged as Y, and as DropDownList when CustomText20 is D. CustomText17 has the quantity list separated by ";", ie "1;2;3;4"--> <span>[DI_QtyBase]</span> <div class="col-qty" update-qty="[DI_CustomText20]"> [DI_QtyBase:InputType=TextBox,size="2"] </div> <div class="dd-qty" update-qty="[DI_CustomText20]"> [DI_QtyBase:InputType=DropDownList,ListItems=[DI_CustomText17]] </div> </td>
I worked out it will work if I hard code the value of the list items...
<div class="dd-qty" update-qty="[DI_CustomText20]"> [DI_QtyBase:InputType=DropDownList,ListItems=2;3;4] </div>
This is not very useful. Any ideas on getting this to work from the data?
Just to let anyone know who finds this thread, I've got this to work, and I sell my QV templates as a product if you are interested.