The usual way is what Paul proposed, the multiple numerical input.
Now the promised two examples:
1. One question to collect the total (Q1a), one question to collect the colors.(Q1b)
In "Input / Max.Sum. Value & Min. Sum Value" you enter the reference to the first question, just
Q1a_1
This is better than to enter "Equal Sum Value"; it avoids the "remaining" line
Remark: To have a better look&feel question Q1a also is of type "multiple numerical" with only one subquestion.
Disadvantages:
- You already get an error before you filled all subquestions.
- The "total" is not aligned properly (except "fruity twentythree")
2. Only one question of type "multiple short text" (this "total" row is not displayed)
Here we ask all four sub questions in one question.
And the validation is "The sum of the rest is equal to the first cell"
So this we enter as question validation equation
Q2_1==sum(Q2_2,Q2_3,Q2_4)
And the error message we enter in the question text as an IF-statement, like
<p style="color:red;font-weight:bold">{if(count(self)==4 and Q2_1!=sum(Q2_2,Q2_3,Q2_4),'sum of flowers do not add up to total sum of flowers','')}</p>
Joffm
P.S.
You can improve the error message a bit by inserting the actual values, like
<p style="color:red;font-weight:bold">{if(count(self)==4 and Q2_1!=sum(Q2_2,Q2_3,Q2_4),'sum of flowers ('+sum(Q2_2,Q2_3,Q2_4)+') do not add up to total sum of flowers ('+Q2_1+')','')}</p>