Welcome Guest, Not a member yet? Register   Sign In
So how would you do this?
#1

[eluser]Bionicjoe[/eluser]
This is a pretty generic question that could be answered with Javascript or something else. Doesn't have to be all CI, but I need some pointers & like the forums here. :-)

I have a need to calculate impact numbers for groups of customers located in different cities. The customers are grouped by services within each city.
Imagine an Excel table similar (but bigger) pictured below.

Code:
CITIES         BASIC   DIGITAL      HD
Boston         11000    5000       2500
New York      102123    4567       8910
Toledo         98543   10987       6123

I'd like these numbers to be hidden from the user pretty much.
The user would be presented with a series of checkboxes for each number entity. Selecting them would total them & enter them into a field (as a "value") that would be submitted as part of my form.

So if a user selected Digital & HD in Boston the IMPACT field would be populated with 7500, the total for those Boston customers.

Any help is appreciated.
#2

[eluser]Georgi Budinov[/eluser]
According to me the best way to do this is to make the calculations on the server-side. No hidden fields populated with client-side calculations and so on, of course only if the requirements allow this.




Theme © iAndrew 2016 - Forum software by © MyBB