JS on a calcution element

micina90

Member
Hello there :)

Is it possible to have JS on a value which is a calculation element?

Basically a button which has an onClick action to which reads the calculation value. The calculation element reads some data from the database. It will display the row count i.e. 5 or 0 and as I click the button I want to have an if based on the calculation element.

Code:
var checkUserTest = $('online_test___check_database').getValue();
alert(checkUserTest);

online_test___check_database is the calculation ...but the alert box is returning empty.
 
In Fabrik 3.1, you have to get the value this way:
Code:
var checkUserTest = Fabrik.getBlock('form_X').formElements.get('online_test___check_database');
value = checkUserTest.get('value');

Replace 'X' by the ID of your form.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top