Forum Discussion
- ChayceDuncan2Qrew CadetWhat method are you trying to use to grab them? Clicking a button? Load when the form loads? If you just need it on the form as they're entering, jQuery is one option. Each field on the form is commonly has an ID associated with the field ID that you can grab. Another option is to do API_DoQuery when the form loads if you need the data when the form is loading
Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base - RyanStanford1Qrew CaptainThe full case is that I have an iframe with javascript which needs information from the form. It would be grabbing the information and running when the form loads, so no button clicking.
I'm using a rich text field to insert an iframe, which renders a custom HTML code page, which also references a JS code page.
What is the field ID notation? I've tried _fid_3.value for example and that didn't work. - ChayceDuncan2Qrew CadetIf you have a code page then doing a DoQuery would be the better alternative to help build the HTML that way.
The field notation is related to the actual id of the elements on the form. So for example:
the input for tdf_5 is field ID 5 in an app of mine
$("#tdf_5").text() gets the value 'Marketing' - RyanStanford1Qrew CaptainWill that work to access the parent html since I'm dealing with an iframe?
UPDATE: nevermind, Figured it out... looks like Quickbase has a global variable kRid, which is the record ID, and I can get it from the parent html with parent.kRid in the iframe JavaScript.
I can use that to do the DoQuery for anything else that I need.