This topic contains 6 replies, has 0 voices, and was last updated by sdavies 11 years, 5 months ago.
- AuthorPosts
- October 2, 2009 at 2:22 pm #323
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
October 2, 2009 at 3:07 pm #4810are 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.
October 5, 2009 at 12:21 pm #4819
AnonymousOK that makes sense. Any more detail or an example I can follow?
October 5, 2009 at 1:13 pm #4820it 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’) /Documentation/manual/html/fl_required_field_checking_and_fi.htm
October 5, 2009 at 3:14 pm #4821
Anonymousare there do while or any linkd of loops in perfect forms? THis is driving me round the bend
October 5, 2009 at 3:22 pm #4822no 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
October 6, 2009 at 11:31 am #4827
AnonymousOK 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.
- AuthorPosts
You must be logged in to reply to this topic.