You can use:
var item = Form.items["canISeeThis"],
isVisible = Rules["sh_" + item.id](data, item);
We will make a more convenient helper method for this.
OK I've added a convenience method for this, which also goes through and checks visibility on all ancestors too. It is:
And will be available as of Maestro 5.0.18.
How do we call this rule Tim?
What do we pass for itemOrId? Is this just a reference to the form object, the same way we'd reference the value? And do we just pass the 'data' object as the second parameter?
I'm currently calling this using:
I get an error in the console: Cannot read property '$$parent' of undefined
I got this working using:
The second method is probably the safest, as the string passed in the first method won't refactor if the textField ID changes.