Thursday 10 August 2006 7:24:10 am
Hi Marko, here's how I dealt with the issue: 1. Edit (or create) settings/override/collect.ini.append.php
In section
[CollectionSettings]
add CollectionUserDataList[poll]=overwrite (was probably unique) Then, 2. Edit the active ezoption.tpl file, removing the "checked" sections Then,
3. Add JavaScript to the poll form so that a blank vote doesn't get sent. For example,
<b>in poll form</b>
onSubmit="return validatePoll(document.pollForm.ContentObjectAttribute_data_option_value_{$poll.0.data_map.question.id})"
<b>in page head</b>
{literal}
<script type="text/javascript">
<!--
function validatePoll(rObj){
for (var i=0; i<rObj.length; i++) if (rObj[i].checked) return true;
alert("Please make a selection before voting.");
return false;
}
//-->
</script>
{/literal}
It's dependant on JS, which makes it a cheap hack, but it gets the job done. Andy
|