This specific approach would not work dynamically with a single add to cart server behavior. It would be possible to do that but it would involve creating a custom loop over the add to cart server behavior to ensure that only items that have a quantity selected are added. I would only suggest doing it this way if you are fairly comfortable with php coding, otherwise you might find it difficult to implement correctly.