Hi
Ive used a pre-defined action element javascript to show a hidden field depending on the value of another element. This is working fine.
However, I need quite a long set of actions so I thought that I will need to write my own code (mainly to make use of OR operator) - however I can not get this to work in the same way as the pre-defined actions. I am trying:
...........................................
It is in the 'item_new' element, and event is set to 'change'
var form = Fabrik.getBlock('form_94');
var itex = form.formElements.get('object_table___item_new').getValue();
var element1 = form.formElements.get('object_table___shape_ann');
if (itex == '38')
{
element1.show();
}
...........................................
but even after various tweeks nothing is working (in testing, the pre-defined doing the same thing is).
Could someone kindly indicate what I am doing wrong, I have tried lots of different variations.
Kind Regards
Ive used a pre-defined action element javascript to show a hidden field depending on the value of another element. This is working fine.
However, I need quite a long set of actions so I thought that I will need to write my own code (mainly to make use of OR operator) - however I can not get this to work in the same way as the pre-defined actions. I am trying:
...........................................
It is in the 'item_new' element, and event is set to 'change'
var form = Fabrik.getBlock('form_94');
var itex = form.formElements.get('object_table___item_new').getValue();
var element1 = form.formElements.get('object_table___shape_ann');
if (itex == '38')
{
element1.show();
}
...........................................
but even after various tweeks nothing is working (in testing, the pre-defined doing the same thing is).
Could someone kindly indicate what I am doing wrong, I have tried lots of different variations.
Kind Regards