Help

Automatically submit form? (prefilled by URL)

Topic Labels: Views
5986 21
cancel
Showing results for 
Search instead for 
Did you mean: 
Nathans
6 - Interface Innovator
6 - Interface Innovator

Is it possible to automatically submit a form?
I’m creating a series of links that have the form input prefilled. Each can take me to the form with the info I want ready and waiting (which is terrific).
At that point I have to click Submit.
I’m using this for class attendance, so it’s a quick rundown of 25 entries at a time. It would be ideal to load the prefilled URL and have that submit automatically. Is that possible?

TIA,
Nathan

21 Replies 21

What you’re describing is an automated integration. Why are you sending the data into a form if your real objective is to send the data into Airtable?

Thanks for the quick reply, Bill. I’m not sure I understand your question.
I’m trying to get three pieces of data into Airtable:

  1. student’s email (using this as a unique ID for each student)
  2. What date/time they arrived
  3. whether they were present/late/absent with excuse/absent without excuse.
    My thought was to use a form because I can enter all three of those at once (using URLs with prefilled data).
    The upshot of this is that I can throw together a simple web page with a picture of each student and their name arranged visually to match where they sit in the room. Underneath each student will be 3 links: present, late, and unexcused absent (I sort out the excused ones later).
    So to take roll, I can look row by row and click one of the choices for each student. This would be much faster than entering each student in Airtable directly, especially since the email field is a linked field and so requires looking up the student.

Did that answer your question?

No. :winking_face:

I get that - whose form? I guess I’m trying to understand why (if you have all the data in the prefill URL) you would need to post it to a form? Why not simply post it to the table and bypass the need for the form?

Perhaps a little diagram showing the process would be helpful. I don’t completely understand where the prefill data comes from and whose form you are calling into with such prefill data.

Yep - I think it’s starting to make sense.

Instead of the links posting to a form, just use the Airtable API to post directly into the table that the form writes into.

Ooookay - I think I get you now!

So, the API makes perfect sense. I didn’t even know you could do that. And I see why you’d suggest that as a more direct route - it’s just over my head. I don’t know JavaScript.

The form is mine - it’s just an Airtable form. (shared so I can enter the info as described by loading a URL).

I set all the prefill data up in a spreadsheet to create the links, concatenating the Airtable-required parts of the URL with my student records. It’s pretty easy to create the prefilled URLs.

If a diagram would still be helpful, I will give it a go. My art skills are slightly higher than my JavaScript skills.

Yep - we get each other!

You are thinking web form and this is not unreasonable - it’s the quickest and easiest pathway. But, it comes at a price - you (a human) must act on the form. In contrast, the API is seamless; it quietly posts the data to the table when you click the link options.

image

There is a way to force a submit upon opening a web form (using JQuery inside the form itself). But unfortunately, I don’t think this is possible with Airtable’s web form because you do not have an ability to script inside their forms.

My recommendation - find a student who knows javascript and add the ability to script this into your web page. Surely there are students studying javascript near you.

There might be a way to do this easier with Zapier webhooks (perhaps) - @Justin_Barrett - is there any way @Nathans can add a simple Zapier call inside a web app that takes some values and sends them on to Airtable?

I see your point (and clearly with the diagram).

I will ask around about a JS-savvy student.

I can use Google Sheets (with IFTTT to send new entries to Airtable). It’s possible to automatically submit a Google form. It’s just even more indirect / more places for things to go wrong.

Yes - the more gears in the machine, the more brittle and/or prone to maintenance it starts to become.

I believe this should be fairly easy. Unfortunately I don’t have time at the moment to test and offer more specific guidance, but my gut says that it would be setup as a webhook trigger in Zapier, with the second step in the zap set to feed the webhook data into Airtable. I don’t believe that JS needs to come into play at all.

How would his custom web app call Zapier’s webhook without issuing a javascript ajax call of some sort?

I use webhooks in Integromat, and it’s just a URL that I can call via a hyperlink that I build in a formula field in Airtable. Clicking the URL forces a new tab in my browser to open, I see the webhook result (“Approved”) as the only output in an otherwise empty tab, and I have to manually return to Airtable (tab or standalone app). In the end, I’m using the webhook feature of Integromat, but not typical webhook behavior where it all happens under the hood, and I suppose that’s where JS typically comes into play, so perhaps I misspoke.

In my case, it’s part of my invoicing system, and the browser switch doesn’t bother me because I’m not clicking lots of these links in quick succession. In the situation that @Nathans described, where the desire it to use links to mark someone’s attendance status, all the tab switching would likely make the system quite cumbersome. In that case, JS would definitely be advisable to keep the usage clean.

No - you didn’t misspeak. Backstory… he wants to eliminate steps and his “link options” are already presented in his web page, so I was thinking - instead of the links on his webpage calling out to the Airtable web form, why not simply use the onClick() event handler to call direct to the Integromat webhook to post the data? This would be vastly easier than building the complete API interface in javascript.

But won’t that open a new tab like my setup does? Or is there a way to make the call under the hood? My Javascript knowledge is rudimentary at best. I played with it a bit many years ago, then stopped for a long time, and only recently have been getting reacquainted with it.

No. If you use JQuery (or any Ajax method) of performing a POST over HTTP, it’s all silently executed. Ideally, the POST to Integromat would wait for a response (in the call-back) and display success or failure.

I’m only suggesting this to @Nathans because (a) he already has a web page, (b) he has all the data he wants to post into Airtable (in the web page), and ( c ) he doesn’t have a lot of API skills. This would be the simplest approach I could envision that would remove the extra form step from the process and provide a chummy way to manage the throughput of the data to Airtable.

Ezeh_Uche
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi @Nathans, check out https://beenform.co. I think it’s the solution to what you’re looking for.

@Justin_Barrett and @Bill.French - your exchange sparked a few things for me. I also discovered Airtable’s gallery view. I think that might be able to create the visual layout there that I’m looking for and create the new “check-ins” that way. I don’t have it all figured out yet, but if that works, it could all be done within Airtable. I’ll post again as soon as I can get a few minutes to see if it’ll work.

Thanks! I just mentioned in another reply that I might have figured out how to do this within Airtable. If not, I will check out beenform.co - looks cool. I would love to avoid paying another monthly fee if possible, and I’d definitely be out of their free plan range, so fingers crossed for the Airtable approach.

Even better! …