Greetings,
I have been wrestling with displaying some output from a form I made for a client. The form must take a checkbox array and display it in a specific part of a sentence in the output.
The form data displays properly but it displays like this:
The answers are answer1,answer2
OR
The answers are answer1,answer2, answer3
If there are two answers there needs to be an AND in between answer1 AND answer2 instead of a comma.
The answers are answer1 AND answer2
OR
The answers are answer1,answer2 AND answer3
OR
The answers are answer1 AND answer2 AND answer3
OR
The answers are answer1 AND answer2 AND answer3,
Here is the Code I use in the form:
<div class="controlset field">
<div class="controlset-fields">
<input name="CriticalToSuccess[]" id="CriticalToSuccess" value="Time Savings" type="checkbox" />
<label for="CriticalToSuccess">Time Savings</label><br />
<input name="CriticalToSuccess[]" id="CriticalToSuccess" value="Cost Savings" type="checkbox" />
<label for="CriticalToSuccess">Cost Savings</label><br />
<input name="CriticalToSuccess[]" id="CriticalToSuccess" value="Quality" type="checkbox" />
<label for="CriticalToSuccess">Quality</label><br />
<input name="CriticalToSuccess[]" id="CriticalToSuccess" value="Risk Management" type="checkbox" />
<label for="CriticalToSuccess">Risk Management</label><br />
<input name="CriticalToSuccess[]" id="CriticalToSuccess" value="Process and Procedure" type="checkbox" />
<label for="CriticalToSuccess">Process and Procedure</label><br />
</div>
</div>
How do you add the AND appropriately?
Thank you in advance!
AceOfJames