It's easier to put the script at a higher level. Group the checkboxes and name them each with the exact text you want to insert, then put the following in the script of the group:

on mouseup
   put the number of buttons of me into nbr
   repeat with n = 1 to nbr
      put the short name of btn n of me into tName
      if not the hilite of btn n of me then next repeat
      put tName & ", " after theList
   end repeat
   delete char -2 to -1 of theList
   put theList into fld "disability"
end mouseup

That way the list is regenerated every time the user clicks any checkbox.

-- Peter

Peter M. Brigham
[email protected]
http://home.comcast.net/~pmbrig

On Jun 19, 2010, at 10:06 AM, charles61 wrote:


Ian,

Thanks for your suggestion! How do I set up a script to add to a string when the script resides in each checkbox?

Charles Szasz
[email protected]

On Jun 19, 2010, at 9:26 AM, Ian Wood-3 [via Runtime Revolution] wrote:

You're only putting one term into the field. Try getting the text of
the field and adding it to your string before setting the text of the
field.

Ian

On 19 Jun 2010, at 14:18, charles61 <[hidden email]> wrote:

Unfortunately, this script does not put "Egg Allergy" followed by
"Fish
Allergy" into field "disability" when both checkboxes are checked.
Instead,
only "Egg Allergy" or "Fish Allergy" are inserted into the field.
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to