Launched: Pre-filled Form Fields

We’ve loved hearing about the incredible ways you’ve been using forms in the few weeks since they’ve launched, and wanted to share an exciting update based on your feedback. Starting today, you can update URLs for forms you publish to pre-fill fields in your forms.

To do so:

  1. Publish your form
  2. Append text to your URLs to specify any fields that should be pre-filled (read on for more)

Prefilled Forms

URL Structure to Pre-Fill Fields

To pre-fill fields, grab your published form URL and add addition text, starting by appending ? to the URL. Then, indicate fields that should be pre-filled using the Column Name (in the underlying results table) and the designated value. For example for the form below, you could pre-fill the name of the “Project” to “Razor Crest” by structuring your URL as https://coda.io/form/Generic-Form-Name?Project=Razor%20Crest.

Then, anyone who access the form from that link will have the project pre-filled for them. If you were on team Galaxy’s Edge and wanted to pre-fill that Project Name for your team when filling out the form, you’d put Galaxy%27s%20Edge as the value for Project in the URL. (Please note the standard URL encoding for apostrophes and spaces, as column names and values need to be URI encoded.)

You can pre-fill multiple values (or pre-select multiple choices from a multi-select list) by separating the values with commas in your URLs.

Pre-Filling Hidden Fields

Perhaps you want to add some information by default in your results table, but in columns that are hidden in your form. To do so:

  1. Navigate to your form options
  2. Select Publish
  3. Open the Privacy settings
  4. Toggle “Include hidden columns for URL parameters” to on

This will allow you to encode your URLs with parameters that are collected in hidden columns that people filling out your form would not see. A common example would be “Source” to structure a URL sent via email to indicate the form was filled out via your email send (vs. via Slack or some other way of sharing).

A note on security & privacy

Please respect your users’ security and privacy when encoding form URLs. Nothing sensitive should be encoded or collected via your URLs, as query parameters are logged all over the Internet. Forms found to be violating this stipulation may be disabled per Coda’s terms and conditions.

36 Likes

Thanks for this update! Coda grows more powerful daily! :rocket:

Can you explain what you mean here? It’s not apparent what the risk is. Thanks!

3 Likes

Our lawyers won’t let us provide legal guidance here, but I would pay attention to section 2.4 in our Terms of use, and related stipulations. (The tl;dr is don’t be creepy and collect private information without users’ consent.)

4 Likes

Really exciting update. Are there any plans to allow for pre-filling and submitting a form via URL?

One of my current workflows involves inventory management where I scan item in via NFC. Currently I have the NFC open a url of a pre-filled and submitted Google Form, then use Albert’s javascript code to port Sheets -> Coda. If the form would auto-submit I could keep everything in Coda! (I know the ideal solution would be using some API webhook, but looking for as no-code as possible)

2 Likes

Interesting use case! You’re right in that using the API would be the best bet here (although, having said that, we have not wired in form submission into the API yet).

The issue with an auto-submitting form URL that submits when you fetch it is that it can be used to harvest data from users who simply click on a link (in particular, the identity of the clicking user). So we’d have to carefully consider the security implications of enabling this if we were to do it.

Perhaps nice to know (if you didn’t already know) that you can prefill multiple fields by connecting the fieldname/entry pairs with an “&”:
form_url?naam=Joost%20Mineur&email=joost@skygliders.nl

8 Likes

Correct. In actuality I don’t need a form at all, just adding rows so the API is likely the solution i’ll eventually need to get to!

1 Like

Very nice, I’m hurrying to test this :+1:t2: :+1:t2:

4 Likes

@Jake_Nguyen thank you for reminding me of the existence of this Youtube gem

3 Likes

Forms in Coda have completely upended our workflow in the best way. Thank you so much for this! My question… We run podcasts through Coda and we have a table with guest information… you know, headshot, bio, social links, etc., which is tied to episodes such that we can hop to guest detail directly from an episode we’re working on. Now, we’ve published the form for the guest table so new guests can submit their own information to us saving us the work of copying and pasting to build the form.

Naturally, with this great feature comes a new desire. Is there a way, or interest in a way to be able to send a link to a past guest so that they can see the form with their information in it? That way, repeat guests can update their bio, headshot, etc., whenever they need to? That… that would be madness.

Thanks all!

Pete

1 Like

Pete, I think this is easily doable. Here’s how I would approach that problem:

  1. Guests fill out info on form the first time, information flows into table A
  2. Table A has a formula column that generates a link to a form with the row information pre-filled. The formula would use the Concatenate() formula to generate the link with that row’s information.
  3. You can send that link as a form to the guest, which would provide them view of their current information. Guest could update their information as needed and the results from that form would flow into a new row in Table A.
  4. Use duplicate row to highlight duplicates, ideally keyed on email or name.
  5. Create a view of Table A that returns all rows that are the earliest version of the duplicate rows. This returns the first, or the ‘wrong’ guest information.
  6. Create a button that deletes all rows in that table.
  7. Create an automation that runs on some interval and clicks button from Step 6.

Voila! Table A always has the latest guest info, and you have a form that you can send to guests which will let them update information on their own terms.

11 Likes

Thanks for that cool solution, Ben. But ‘easily doable’ is a bit too optimistic :slight_smile:

4 Likes

Ha! Fair point @Stefan_Stoyanov :slight_smile:

1 Like

Love the feature, it does however seem to be quite slow for me. Takes about 20 seconds before it visually fills the form.

3 Likes

The processing seems to take a little bit, but for me it takes about 1 second to load the form and about 3 seconds to fill the fields (2 fields).

2 Likes

(New to Coda, so forgive me if this is obvious…) I’m wanting a hidden field to be pre-filled, but for a form that’s just inline on a coda page (i.e., not “published”). The workaround I’m finding is that I’m editing the URL (as you’ve said above - works fine) and then embedding the form on the page. But that seems like it should be unnecessary, right?

2 Likes

@Pete_Wright I am stealing this line for all future new posts!

2 Likes

Blockquote
I’m wanting a hidden field to be pre-filled, but for a form that’s just inline on a coda page (i.e., not “published”).
Blockquote

Any update on this? I’m trying to pre-fill form fields for an unpublished form without luck. The form is defined within the same document that I want to use it in, and when I tried embedding (which doesn’t sound workable anyway), it gives me an error about a recursive document include.

3 Likes

Hm I have a text Column as the first field on the form, but it seems I can’t use the pre-filled parameter with it. If I move that field to be the second field on the form, then it works.

1 Like