Hello,
I have used the following code for hide/show:
var form = Fabrik.getBlock('form_12');
var v = form.formElements.get(?customers___contacts').getValue();
if (v === 'phone') {
form.formElements.get(?customers___fax?).hide();
form.formElements.get(?customers___phone').show();
form.formElements.get(?customers___email').hide();
}
if (v === 'email') {
form.formElements.get(?customers___fax?).hide();
form.formElements.get(?customers___phone').hide();
form.formElements.get(?customers___email').show();
}
if (v === 'fax') {
form.formElements.get(?customers___fax?).show();
form.formElements.get(?customers___phone').hide();
form.formElements.get(?customers___email').hide();
}
if (v === 'address') {
form.formElements.get(?customers___fax?).hide();
form.formElements.get(?customers___phone').hide();
form.formElements.get(?customers___email').hide();
}
It doesn't work. I have tried it either with "click" and "load" action for a radiobutton element. Is it correct?
Thanks
Enzo
I have used the following code for hide/show:
var form = Fabrik.getBlock('form_12');
var v = form.formElements.get(?customers___contacts').getValue();
if (v === 'phone') {
form.formElements.get(?customers___fax?).hide();
form.formElements.get(?customers___phone').show();
form.formElements.get(?customers___email').hide();
}
if (v === 'email') {
form.formElements.get(?customers___fax?).hide();
form.formElements.get(?customers___phone').hide();
form.formElements.get(?customers___email').show();
}
if (v === 'fax') {
form.formElements.get(?customers___fax?).show();
form.formElements.get(?customers___phone').hide();
form.formElements.get(?customers___email').hide();
}
if (v === 'address') {
form.formElements.get(?customers___fax?).hide();
form.formElements.get(?customers___phone').hide();
form.formElements.get(?customers___email').hide();
}
It doesn't work. I have tried it either with "click" and "load" action for a radiobutton element. Is it correct?
Thanks
Enzo