Hi,
ok, I created one example as you want!
Please download->unzip->and install it (BF->Configuration->Package Installer->select this xml file->Install Package).
You can find code in Actionscript of checkbox group element, the code is:
function ff_cb_action(element, action)
{
switch (action) {
case 'change':
ff_cb1_action(element, action);
ff_cb2_action(element, action);
break;
default:;
} // switch
} // ff_cb_action
function ff_cb1_action(element, action)
{
switch (action) {
case 'change':
vals = '';
opts = JQuery("[name=\"ff_nm_cb[]\"]");
for (o = 0; o < opts.length; o++)
if (opts[o].checked)
{
vals = opts[o].value;
}
if (vals=="Email") // here you can add further dependencies
{
return bfToggleFields('on','element','Email',bfDeactivateField);
}else
return bfToggleFields('off','element','Email',bfDeactivateField);
break;
default:;
} // switch
} // ff_cb_action
function ff_cb2_action(element, action)
{
switch (action) {
case 'change':
vals = '';
opts = JQuery("[name=\"ff_nm_cb[]\"]");
for (o = 0; o < opts.length; o++)
if (opts[o].checked)
{
vals = opts[o].value;
}
if (vals=="Phone") // here you can add further dependencies
{
return bfToggleFields('on','element','Phone',bfDeactivateField);
}
else
return bfToggleFields('off','element','Phone',bfDeactivateField);
break;
default:;
} // switch
} // ff_cb_action
-function ff_cb_action(element, action) -> Instead cb insert name of your checkgroup element!
- opts = JQuery("[name=\"ff_nm_cb[]\"]"); ->Instead cb insert name of your checkgroup element!
Please create two text elements with the names "Phone" and "Email" and turn off them in advance of the element!
In the Form Advanced option scroll down to the section Visible roles and insert this code
turn on element mydummy if yourdummy is something
If you get stuck, let me know and I will help you!
Regards,
Mirko