CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Checkbox sum of values

Print topic Send  topic

Author Message
Danilo
Posted: 11/25/2004, 5:22 AM

Hi,
I have 5 checkbox with differents values to store in the same variable, codechargestudio stores only the first value and i want to store the sum of values from the selected checkboxes.

How could i do it?

Thank You!
mrachow


Posts: 509
Posted: 11/25/2004, 2:13 PM

Do you would like to store some kind of bit pattern representing the setting of a set of checkboxes?

In that case you should connect a hidden field with a database column containing the pattern. On submit get the values of all checkboxes and compute your pattern and store it into the hidden field.

Regards,
Michael
_________________
Best regards,
Michael
View profile  Send private message
Danilo
Posted: 11/26/2004, 3:16 AM

Hi mrachow,

My problem is that I have a database table that sets all checkbox lists with the bound columm and text columm, the result should be stored in another database table that has one columm for each of the checkbox lists, these values stored should be the sum of all checkboxes checked for each checkbox list. Codecharge only stores the smaller value checked. How?!

Thanks
mrachow


Posts: 509
Posted: 11/26/2004, 5:53 AM

Could you please explain what you have done in the situation about you say only the smaller value is stored?

Thanks,
Michael


_________________
Best regards,
Michael
View profile  Send private message
hector
Posted: 03/26/2005, 5:11 PM

I have to display a list of values (records) from a table and show them as checkbox options for antoher record in antoher table, but thats not the real problem.

each checkbox has a bound column,
I need to save a string that contains the bound column values in another field
ej

id| text
------------
1 | ab
2 | bc
3 | cd

if user checks 'ab' and 'cd', i need to save a string "13".

any clues ?
Nicole

Posts: 586
Posted: 03/28/2005, 1:51 AM

Hector,
Refer to CCS Examples Pack Many To Many Checkboxes example. You can use the similar code in your project to store selected items in comma separated list
http://examples.codecharge.com/ExamplePack/ManyToManyCh...anyCheckbox.php

_________________
Regards,
Nicole
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.