PerfectForms Forums » General

Voting

(7 posts)
  1. sdavies
    Member

    Hi,

    I'm having trouble with a voteing form. I have two check box groups where group one you can cast 2 votes and group two where you can cast a vote 3 times. I can't get the form to work for this.

    Any ideas? should I use a different object?

    Thanks in advance

    Simon

    Posted 2 years ago #
  2. ijobling
    Member

    are you trying to allow a user to select 2 itiems from one checkbox and 3 from another selection of items in another check box?
    if so, look at how possibly behaviours can help you do this.
    for instance, one way is to look at the 'checkbox is clicked' event on each of the checkbox items, and then run a 'set field' script to write 1 (one) to a hidden field. if your set field script is set up to write 1 + value of hidden field, it will basically COUNT .. and then on that hidden field 'when data has changed' event you can run a conditional script so that when the value of that field reaches your limit (2 or 3 for your two different check box groups) you can then 'disable' the check box to stop the users selecting more.

    Posted 2 years ago #
  3. simond
    Member

    OK that makes sense. Any more detail or an example I can follow?

    Posted 2 years ago #
  4. ijobling
    Member

    it isn't practical to have an example form for EVERY possible thing that can be done I'm afraid.
    but set up a simple test form and break the requiremnents down into seperate stages so you can see how they work individually.
    ie that you can set up a script that can 'count' up into another field from the 'is clicked' event.
    When you have that, then look at second element where you can validate the content of this field in a conditional script. That is demonstrated in this interactive form (although not specifically on a 'value') http://www.perfectforms.com/Documentation/manual/html/fl_required_field_checking_and_fi.htm

    Posted 2 years ago #
  5. simond
    Member

    are there do while or any linkd of loops in perfect forms? THis is driving me round the bend

    Posted 2 years ago #
  6. ijobling
    Member

    no afraid there are not. knowing you were 'quask' user, then methodology is much the same though for the count.
    on the 'group is clicked' event, simply add in a 'set field' script that is setting the value to another field (eventually hidden on your form) to be 1 and with the + value of this other field for it to 'count up'
    preview the form, click one of the items in the check box and see that the 'other field' then shows 1, click another item in the check box.. and see it then shows 2

    Posted 2 years ago #
  7. simond
    Member

    OK All. Iff you want me to tell you how I did it them please ask. Thanks Ian for your Help.

    I've got a groovy bit of error trapping working.

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in or register to post.

Contact

1917 Palomar Oaks Way
Suite 160
Carlsbad, CA 92008
866.900.8588

  picture  picture  picture  picture