I have an important question at the moment. I wanted to know how I can go about multiplying or adding checkboxes to display information on a label. For example if I have 3 checkboxes labeled chkMovie, chkAmusement and chkConcert and I have 2 checkbox groups called chkChild and chkAdult. How can I multiply the checkboxes (not the checkbox groups) to the text number entered in a field. There will be one field that asks for the number of adults or kids. If the user picks adults they can't pick children. But if they pick adult they have to select 2 out of the 3 selections. And each one has a price to it. For example Movie can be $6.00, Amusement park $15.00 and Concert $20.00. I'm just basically trying to figure out how to add all those numbers up and then multiply it by the number entered in the text field. What I'm working on is way larger than the examples. But if I can figure it out from this I can apply it to the overall program. Thanks for taking the time to read this and for any person that helps.
NycNessyness
0
Junior Poster in Training
Recommended Answers
Jump to PostWell I don't see how you can multiply or add checkboxes or checkbox groups. You multiply and add numbers, so if a person checks "Concert" and a concert costs $20 and there is some text that they enter into some type of text field somewhere and they press a submit …
Jump to PostYea that's what I'm trying to do, but implementing it in code is what I find difficult.
Well I understand it's part of a larger project and you don't want to (and we don't want you to) put up a thousand lines of code, but you should probably put up …
All 7 Replies
VernonDozier
2,218
Posting Expert
Featured Poster
NycNessyness
0
Junior Poster in Training
VernonDozier
2,218
Posting Expert
Featured Poster
NycNessyness
0
Junior Poster in Training
NycNessyness
0
Junior Poster in Training
VernonDozier
2,218
Posting Expert
Featured Poster
VernonDozier
2,218
Posting Expert
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.