What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Trying to allow voting with a tally of votes cast

    Asked by nystea on December 06, 2015 at 09:20 PM

    I'm trying to create a form to allow votes for the board of directors. We will have a handful of candidates and want members to be able to vote for "X" number of "Y" candidates.

    I know how to limit the maximum choices within a field. I also understand how the CountIF function works in Excel, but I don't know how to make it work with results like the sample with 6 candidates and a restriction to vote for a max of 3. 

     

    Results:
    Option 1; Option 2; Option 6
    Option 2; Option 3; Option 4
    Option 1; Option 2; Option 3
    Option 1; Option 4; Option 6

     

     

    Since they are no single choices, it seems checkboxes are the better option over radio buttons. Your survey tools appear to allow for ranking not voting on a list. 

    I searched the archives and couldn't find an example that did this unless it was a single vote per line. With scripting I could parse the candidates based on the ";", but would prefer to have something more readily analyzed. 

    Is there a better way to do this that I'm not seeing?

    Thanks for your help!

    Page URL:
    https://form.jotform.com/53397815190967

    tally allow survey create a form checkboxes radio buttons excel
  • Profile Image

    Answered by nystea on December 06, 2015 at 09:21 PM

    In addition - the voting results would be secret. I don't need to display a pie chart or any other representation of the data online.

    We would tally the votes and notify the winning candidates. All other details from the vote would remain secret. 

     

  • Profile Image

    Answered by Ben on December 07, 2015 at 12:36 AM

    I would first like to suggest one widget since I think that it might be a good idea for your use case, even if it is not exactly what you have described. You can see it here: Orderable list

    - Basically you place the names, and others sort the names in the order of preference, allowing you to see the results.

    Now in regards to what you are asking.

    The best way to do it would be to have 6 different checkboxes, hide their labels so they look as if they are a single checkbox and then check the form through conditions.

    Now, instead of creating tons of conditions to check if specific sets of fields are filled out or not to see if there are 3 or more checkboxes selected, we will use a set of fields and form calculation which we will check and see if the number is bigger than 3.

    Basically, we create a condition for each checkbox that sets the value as 1 on the corresponding field (a textbox that is hidden on a form) if it is filled out.

    Now you set the form calculation to sum the values of these textboxes:

    Now when we have done this, we can add additional usable things to the form, such as error message (by adding text to Text field) and by disabling submit button if the value is bigger than 3.

    We do this through conditions as well:

    Once you do it, the form looks like this: https://form.jotform.com/53400934277960

    Now, in your spreadsheet you will see one reply per checkbox field.

    If you are using Excel reports, you can just select the fields that you wish and not include the ones that you do not want to see in the Excel, or if you are using Google Spreadsheet, simply deleting the column (not the data in the cells) will make the integration stop posting that data in there.

    Hope this helps, but do let us know how it goes and we would be happy to help further if needed :)

  • Profile Image

    Answered by nystea on December 07, 2015 at 02:54 PM

    All of that makes sense. Thanks!

    https://form.jotform.com/53405445586965

    I made some test submissions and let them sum using the inserted 1 concept.

    I also discovered that by having the individual checkboxes, I can just use CountIF and count the candidates by the candidate's named (Option 1 in this case), etc.

    This does not allow for a maximum limit. It would work well for a list of preferences or choices where a participant could choose everything that appeals to them.

    The part I can't figure out is how to hide the field labels. I assume it is done with CSS, but I have zero CSS skills. The fields don't have to be hidden as the candidate's names could go in those spots. Can you let me know how to modify that?

    My next step is to decide on loose vs strict submission controls vs trusting the voters to vote only once. As it sits this form is anonymous and everyone can vote secretly but there's no way to prevent multiple votes.  

    I want to prevent stuffing the ballot box. Can strict controls be enabled with a generated token instead of forwarding the name or email address to us? Something that would store the data but not necessarily share it with us? Do I hide those fields from the confirmations and let the voter think they're being anonymous and live with it?

    Loose control would work with just IP address capture assuming people didn't vote at work, at home and on their phone. 

    I am not truly worried about the group doing this, but having the systems in place prevents grousing, finger pointing and general discontentment. It's also a good thing to learn for other forms

    .

    Thanks for your thoughts on this.

  • Profile Image

    Answered by Ben on December 07, 2015 at 04:21 PM

    The part I can't figure out is how to hide the field labels.

    Yes, you are correct, I have used CSS for that.

    The great thing about not knowing CSS is that there is Form Designer waiting for you to test it out :)

    This is a rather short videos set, but they pack all the right info in them: Video Course: Form Designer Basics

    We are also here if you need help with a specific part of the form (some CSS that is not as easy to do within designer).

    This does not allow for a maximum limit. It would work well for a list of preferences or choices where a participant could choose everything that appeals to them.

    I presume that you are talking about Orderable list widget since the multiple checkboxes can be set for maximum value - we set it for 3: https://form.jotform.com/53405445586965 (your form)

    It is not set as such directly (on the checkbox), but it works.

    Now since we need to keep one question  or issue per thread, I have moved your question about submission limits to a new thread here: http://www.jotform.com/answers/719787 where we will be answering shortly.