I'm building a form using HTML with JQuery mobile so that the form can be used on mobile devices.
I have the form exporting to CSV via email. However the write to the CSV file doesn't occur when Checkboxes aren't checked.
Can I use functions in jQuery to pull the values from the checked checkboxes, using the values from the label, and to mark the unchecked boxes as Null
or as a Space
so that when I import them into Excel it notices the values aren't checked?
<label for=question4 class=input> 4. What language (s) are you currently using? </label>
<fieldset data-role=controlgroup>
<legend>Multi select:</legend>
<input type=checkbox name=checkbox-1 id=checkbox-1 class=custom value=english/>
<label for=checkbox-1> English</label>
<input type=checkbox name=checkbox-2 id=checkbox-2 class=custom />
<label for=checkbox-2>French</label>
<input type=checkbox name=checkbox-3 id=checkbox-3 class=custom />
<label for=checkbox-3>Spanish</label>
<input type=checkbox name=checkbox-4 id=checkbox-4 class=custom />
<label for=checkbox-4>Brazilian Portuguese</label>
<input type=checkbox name=checkbox-5 id=checkbox-5 class=custom />
<label for=checkbox-5>Italian</label>
<input type=checkbox name=checkbox-6 id=checkbox-6 class=custom />
<label for=checkbox-6>German</label>
<input type=checkbox name=checkbox-7 id=checkbox-7 class=custom />
<label for=checkbox-7>Japanese</label>
</fieldset>
</br>
if there isn't a way to do in JQuery, what about in PHP? Since I'm using PHP to populate the CSV file.
Would it be some form of a if statement that says:
if checkbox = yes then pull value from <label>