Help

Re: Give a unique ID to find where a form was clicked on from

Solved
Jump to Solution
6770 7
cancel
Showing results for 
Search instead for 
Did you mean: 
Alec_Kap
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello! I am trying to figure out how to apply a unique ID when entering a form so you can see where it was clicked from. I have a store where each row in Airtable posts a new object for sale. I want the ‘purchase item’ button to lead to a form where they can fill in all their information but I can’t figure out how to assign some sort of unique ID so that I can correlate the item they want to buy to the information they put into the form.

Is anything like this achievable or is there any advice? Thanks so much for anything and everything!

23 Replies 23
Alec_Kap
5 - Automation Enthusiast
5 - Automation Enthusiast

One more fast question for you! I’ve read up about prefill_ and learned a ton, but i’m having trouble locating documentation on variable syntax. I have https://airtable.com/1234?prefill_ but i can’t figure out how to fill the form field with information from another field. For instance, reading up I found the date prefill_ is ?prefill_Date=TODAY() or ?prefill_Date=Now() but what is the syntax for pulling from a records field?

Is there a page that tells me the syntax for all these options that I can’t find because i’m probably using the wrong words?

Thanks again for all the help Bill and for nudging me in the right directions!

Alec_Kap
5 - Automation Enthusiast
5 - Automation Enthusiast

I figured it out! Using this formula:

CONCATENATE("airtable.com/form?prefill_xxx=",{ID Number})

That prefills my form and then I hid the field and now I have a hidden tracking system!

Is that really working for you? I would have guessed it would be …

...form?prefill_xxx=",{ID Number}

Great to see it coming together for you.

Now you have the underpinning infrastructure for many tracking analytics. Using javascript you can, for example, capture when a user hovers over a product image and record that subtly in the background and pass the hover data into the Airtable form as yet another prefill value.

You are correct as always Bill! I forgot to type the rest out here. I’ll edit it above incase future people use this thread for their own problem.

Doing some more research though it looks like I can’t have the prefill information return a value in my table when it’s a hidden field in my form which really takes the wind out of the sails. Do you know of a work around to make a form field read only so that I can still use this method without anybody able to change the value of my ID number?

That (I believe) is currently the state of Airtable as evidenced by this lengthy and heated discussion. I don’t believe this feature request has been addressed (yet) but it definitely warrants their attention. @Justin_Barrett can probably advise us both.

There are some options though such as Air2Table and other forms handlers that would then send the data into Airtable via Integromat or Zapier.

I appreciate the thought, but I’m afraid that I don’t have any special insight into this issue, or any other issues for that matter.

That aside, I’ve got a question for @Alec_Kap: why does the field that you’re pre-filling need to be hidden? If someone is purchasing a given item, there’s no need to hide the info about their purchase. In fact, I think it would make the transaction more clear to leave it in view.

I haven’t seen much in this discussion that describes the details of your base, but here’s a rough setup that (to me) would work fairly easily.

Two tables: [Items] and [Purchases]. The [Items] table is where you have everything that you’re selling. The form a buyer uses to purchase a given item would be in the [Purchases] table, and would contain an {Item} link field that would allow a single selection from [Items]. A formula field in the [Items] table would build a custom link to the [Purchases] form, pre-filling the {Item} link field to point to the related item.

I think he’s concerned that a product “key” field if exposed could be changed intentionally or by accident, rendering the purchase event ambiguous.

True, but that could be largely overcome by setting the link field as a required item. The worst the purchaser could do is delete the link, but because it’s a required field, they’d have to choose it again to submit the form and complete their purchase, and chances are they’d choose the same item and not a different one. If the field were something like text or a number, that would be more problematic, but a link is harder to mess up.

Alec_Kap
5 - Automation Enthusiast
5 - Automation Enthusiast

Bill is completely correct! I’m looking to make sure nobody accidentally alters the record. I already have prefill filling in other information to make sure people have transparency in what they are specifically buying.

Your solution is interesting but seems a little messy/cumbersome visually. Since Airtable can’t really do this natively I’m exploring Bills thoughts on using a different service and pairing them with Zapier :man_shrugging:

I’m open to other ideas if you have them though! Thanks for all the help!

When using a form, linked records can’t be altered. All you see is the name from the linked record’s primary field. In Airtable itself, you can potentially see all the other details of the linked record, but forms only show you the primary field contents.

Can you elaborate on what makes this option messy/cumbersome? In the test I ran, it didn’t feel that way, but again, I don’t know the specifics of your base design. Here’s how it looked in my own quick test:

19%20PM

As I said above, the worst thing the user can do is click the “x” at the end of the selected item to delete it. Because it’s a required field, though, they’d have to just pick it again to complete the order.