g_form.getValue()
- g_form.getValue() is a very commonly used g_form method
- Retrieves a field value from the form (NOT the database)
- Pay close attention to the field's data type when using this method
Since JavaScript is weakly typed, it is not always necessary to verify data type when scripting. In the
case of the g_form.getValue() method however, you must pay attention to data type or your script
may have unexpected results.
The g_form.getVaIue() method always returns a string despite the data type of the field. If returning
a number is important, use the or g_form.getDecimalValue() methods instead.
IMPORTANT
This method cannot retrieve values from the database, it retrieves values from forms even if the field is not visible in the current view or to the logged in user.