TablePress: checkbox and deopdown select calculations
-
Hello,
I like to create a some table of services in Tablepress such as the link
of that hotelhttps://www.safirhotel.net/booking
I will explain a little bit:
As you may see in the page you choose a room first (multiple available through dropdown). Click “BOOK” button and then go to the next table for supplement options.
Here from the table you can choose whatever first by marking the “checkbox” in column 4, and then choosing Quantity from dropdown select.
By marking check box you will see immediately the total sum at the bottom of the table updates.
This means that the total amount is sum of product of cells in columns 2,4 and 5 respectively.
Now my question is:
1- how to add checkbox such that when it is checked it returns 1 otherwise 0?
2- how to add dropdown select such that the values chosen can be calculated numeric?
3-how to define the total cell value?
4- By the way, I also like plus/minus button (to add value) similar to amazon shopping cart instead of dropdown select.PS. I wrote some simple code and you may see if they are good or not, if not please help me with the correct ones.
I choose the single room 22.5 euro, click “BOOk” go to table
1-for the checkbox<input type="checkbox" value="1" class="checkbox" id="001" onclick="addPerService(this)">
2- for the dropdown select
<select size="1" ><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>
3- For the total
=22.5+B1*D1*E1+B2*D2*E2+B3*D3*E3+B4*D4*E4+B5*D5*E5+B6*D6*E6+B7*D7*E7+B8*D8*E8+B9*D9*E9+B10*D10*E10+B11*D11*E11
Unfortunately the in above formula the column D does not have any value and I get the error
!ERROR! D1 does not contain a number or expression
Thanks.
- The topic ‘TablePress: checkbox and deopdown select calculations’ is closed to new replies.