Grabbing A Key-Value Pair From The URL

I’m looking to set a field in FMBF with whatever the query is in the url:

acme.fmbetterforms.com/#/form/FR_X99551F6-C3A7-8E47-BB10-3B3C27?id=1234

I was thinking that something like this would work in the Misc. tab:

“namedActions”: {
“onFormLoad”: [{
“action”: “function”,
“function”: “var q = (GrabTheQuery)"" ;\n\n{ model.query = q }”,
“options”: {}
}]
}

My question is what do I replace (GrabTheQuery) with to get everything from the ? to the end of the url?

See docs, there is a new BF.getQuery function in new code bases.

url: app.fmbetterforms.com/#/?theKeyName=abc123

var theValue = BF.getQueryParam('theKeyName') // abc123

Most excellent! We’ll definitely update for that.