Hello,
I would like to know if the following situation is possible within the Servoy webclient.
I need to generate a HTML-table depending on the data in my database. In the picture you see an example. It must be possible to order clothes in several sizes and depending on the number of articles ordered, the price is determined.
Using the button ‘Winkelmandje’ the inputfields must be processed in Servoy javascript to determine the quantity ordered per size.
Is that possible and if so, how can I determine what sizes have been ordered and what is the quantity. Within Servoy javascript I’m able to determine to calculate the correct price when I’m able to use the input data.
What I need to know, is how can I handle these input fields in script.
The sizes that are shown S-M-L-XL are just an example. Depending on the article there are more/less/other sizes. So the table is not fixed. It must be dynamic.
Can someone push me into the right direction?
Thanks
Martin
Why do you want to do that in HTML? Is there a good reason to not use a servoy form in table view mode?
The reason that I thought the TableView is not a good idea, is because I would like it to have in a table like on the picture. The experience that I have with tableviews is, that it is not so easy to create such a tabel using a combination of servoy fields and HTML. Because the prices you see on the right, must be created by generating HTML, because the numbers of columns is not predefined.
And I’m not sure if the borders of the columns in HTML and Servoy will be exactly the same.
That is why I thought about 100% HTML solution, but of course if that is possible.
Martin
I guess your best bet is have a tableView with 3 columns, where you put custom HTML displaying x number of prices in separate columns into the 3rd column.
You cannot get back the values in input fields in custom HTML, at least not without either altering the HTML templates Servoy generates or a plugin of some sort.
Paul
Paul, you beat me for a couple of minutes: I was about to give the same advice. ![Smile :)]()
OK Thanks for the reply.
I wanted to be sure that inputvalues from HTML-block can not be used in standard Servoy Script. I’ll try to do it the way like Paul describes and we’ll see what it will look like
Martin