# Setting a Default Value for a Field

URL: https://wpusermanager.com/article/267-setting-a-fields-default-value/
Last updated: 2021-01-23

As of WP User Manager v2.5, you can set the default value of text, hidden, number, radio, dropdown, and textarea fields on registration forms. You can do this by -

- Navigate to Users > Custom Fields
- Edit the field
- Scroll down in the General tab to see the 'Default Value' setting

![](https://s3.amazonaws.com/helpscout.net/docs/assets/5d6cea4404286350aeeb5235/images/600bfb1dc64fe14d0e1fde02/file-TQpVpdIrJ9.png)

The default value will only be populated on the registration forms.

Setting a Default Value From a Query String
-------------------------------------------

A query string is part of a URL that contains information, in the format <https://mysite.com?key=value>

You can populate the default value of a field using the value of a query string using the following method.

- Work out the query string key you will use, eg. [https://mysite.com/register?item=yoga](https://mysite.com/?key=value) the key will be 'item'
- Edit the field and add the default value as {query\_var key="item"} (replacing item for your key)

![](https://s3.amazonaws.com/helpscout.net/docs/assets/5d6cea4404286350aeeb5235/images/600bfc7ec64fe14d0e1fde08/file-wgS0BSHUd6.png)

When this field is used on registration forms, the value will be auto-filled based on the value of the query string. So for my example of [https://mysite.com/register?item=yoga](https://mysite.com/?key=value), this field above will have the value 'yoga' by default.
