Question
How do you refer to a specific checkbox? I want to autofill some checkboxes within a form. I've tried using several variations on the theme of:
%CALC{"$IF($formfield(GoldenRetriever)==0),($formfield(dog.box1)=0),($formfield(dog.box1)=1)")}%"
or am I barking up the wrong tree?
Environment
--
JoeDeal - 11 Apr 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Hopefully to clarify, the checkboxes in question would "autocheck" dependent upon entries being made in other fields on the same form.
--
JoeDeal - 12 Apr 2006
You can do that with a CALC. Example using FORMFIELD:
%CALC{$IF($FIND(OsHPUX, $TRANSLATE(%FORMFIELD{OperatingSystem}%, $comma, ;)) < 1, , checked=\"checked\")}%
See example at
Sandbox.BlahForm
If needed, you can use a SEARCH instead of a FORMFIELD. If done with a SEARCH you need to defer the CALC to fire off for each search hit. Something like:
format="$percntCALC{$IF...)}$percnt"
--
PeterThoeny - 12 Apr 2006
FABULOUS! I would have never figured that out. Interesting how that works. I've got lots to sort out and learn. THANKS.
--
JoeDeal - 12 Apr 2006
Topic revision: r4 - 2006-04-12
- JoeDeal