Skip to main content
Question

Getting field values into javascript on the page

  • February 6, 2019
  • 0 replies
  • 47 views

I've noticed in some posts, that there is a notation to get the value of fields dynamically while running JavaScript on the page, IE: iol technique...

However, I've been unable to get this notation correctly to be able to recreate.

I've attempted similar to this:

var link = $("#_fid_12").val();

console.log(link); but this always comes back undefined or errors out entirely

  • Quickbase Alumni
  • March 5, 2019
I have the same issue with some fields. Is the field in the table associated with the form or is it a linked field to another table?

  • Author
  • Quickbase Alumni
  • March 5, 2019
It's a field on the form itself. It may be a lookup field, but it's still a regular field on the table. I've since moved away from this method, so I haven't resolved this question.

Forum|alt.badge.img
I agree this no longer works.  The hack that I thought of was to add a hidden div to a formula rich text field with a specific id that I could then reference in my js file.  

So, if you want to pass the value of the "Name" field as a variable called "my_name" ...

The formula rich text field:
"<div id=QBU_name style='display:none'>" & [Name] & "</div>"

in the .js file:

var my_name = document.getElementById("QBU_name").innerHTML;


------------------------------
Eloyse Ellerman
------------------------------