Page 1 of 1

setting variable value depending another variable

Posted: Feb 12th, ’19, 12:09
by miaousse
Hello,
I would like to create a form where i select with a radio button a value. Is it possible to set the value of others variables based on the first choice?

Ie %INSERT_Choice% (radio type button: choice1 and choice2)

%INSERT_dependentChoice1% (dependentChoice1_1, dependentChoice1_2)
%INSERT_dependentChoice2% (dependentChoice2_1, dependentChoice2_2)

Re: setting variable value depending another variable

Posted: Feb 12th, ’19, 14:18
by Tom
One way is to use Conditional macro, like:

%SELECT__Choice%%IF_MyCondition%%SELECT_sel1%%ELSE%%SELECT_Sel2%

where the condition is
(SELECT__what="Choice1")

Use 'No Output' prefix "_" in front of a variable name (_Choice) to instruct FastKeys not to output the value.

Re: setting variable value depending another variable

Posted: Feb 13th, ’19, 08:48
by miaousse
Thank you for the answer.
I was not able to have the condition work the first time but i finally manage to get it.