I was working with a client recently and had the need to get the Display Value of a Reference field that was on the form. I didn’t want to have to make an AJAX call just to pull this value (on the server side you would use the “getDisplayValue()” function), and that’s when it hit me. The client already has this value, why not use it? Initially I was thinking about DOM/jQuery which was not going to be ideal. As I dug further I uncovered a little known method to pull the Display Value from a reference field. Drum roll please!
Hopefully this saves someone some time in the future.
g_form.getDisplayBox(‘field_name’).value is working in desktop view, but it is not supporting in mobile view.
Do you have any idea about how can we achieve this functionality in mobile view.
Unfortunately there is not a good method to do this in mobile. In this scenario, the only option I know of is to get it from the server.