---
title: "Encode URL Component to Generate Pre-Filled Form URLs"
description: "Effortlessly generate pre-filled form URLs by encoding URL components with ease."
url: https://help.stackby.com/es/articles/40-encode-url-component-to-generate-pre-filled-form-urls
collection: "Using Formulas"
updated: 2025-01-10
language: es
alternates: [en]
---

# Encode URL Component to Generate Pre-Filled Form URLs

Effortlessly generate pre-filled form URLs by encoding URL components with ease.

The **Encode URL** function encodes a URL string, replacing certain non-alphanumeric characters with % and a hexadecimal number.

_In this article, we will learn how to set up a base to automatically generate unique pre-filled form URLs using ENCODE\_URL\_COMPONENT._

**Here are the steps:**

1\. Create the grid. Create columns "Name" and "Last Name".

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/fe48d4b6de1e6670ed5412d528b06337a10edf5d4c22eb24c1aacd511e8baa561626759070615.png)

 2. Add data in the column.

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/e98e72b92f64a1f2387d1b0458625146130c4472682f067a5da97d1846a762d01626759327760.png)

3\. Add one more column Encode\_URL,  column type will be formula.  

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/3d9fb6509913889fb370592f101138a6e42f6e7f240540dfd5e6d9e32c223ea21632744739506.png)

4\. Click on "Add View" from view section and then click on "Form Layout".

5\. Go to "Form View" and Drag columns into the form layout

For Formula:

We have used two formulas here and they are:

1.  CONCAT() Function. 
    
2.  ENCODE\_URL\_COMPONENT() Function 
    
3.  CONCAT function is used Concatenates all the column values together
    
4.  Prefill is the second field we are prefilling. 
    
5.  Add another operator “=”
    
6.  Add ENCODE\_URL\_COMPONENT function. The encode URL function will translate the text name of the field ('Name') into an encoded URL.
    
7.  When prefilling multiple fields we need to add an ampersand within the prefill string. Like so '&prefill\_'
    
8.  Add  “&prefill\_ followed by (‘last name’)
    
9.  And finally, add ENCODE\_URL\_COMPONENT function for (‘last name’).  
    

**PRE-FILL FORMULA FUNCTION:**

```javascript
CONCAT("https://stackby.com/form/frshr16327442818961e023e?prefill_","(Name)","=",ENCODE_URL_COMPONENT({Name}),"&prefill_(Last Name)=",ENCODE_URL_COMPONENT({Last Name}))
```

6\. Now go to grid view and click on the URL

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/8b2c47f8057be8003a872bb338147af4fa65961b20082714e2d04b5a248df42c1632745965922.png)![](https://d258lu9myqkejp.cloudfront.net/attachment_images/640d56ec23e279fc9bbb8261d7a1990f6e19760123672dc8e49b0ceff0d927c91632745936569.png)

In this way, you can test out each URL by clicking them and seeing the unique date filled in the form.
