# Can I undelete a custom user field?

**URL:** <https://meta.discourse.org/t/can-i-undelete-a-custom-user-field/102255>\
**Category:** Product Support\
**Tags:** user-custom-fields\
**Created:** [17 november 2018 om 23:45 UTC](https://meta.discourse.org/t/can-i-undelete-a-custom-user-field/102255 "2018-11-17T23:45:10Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Post date:** [12 juni 2020 om 08:35 UTC](https://meta.discourse.org/t/can-i-undelete-a-custom-user-field/102255/5 "2020-06-12T08:35:40Z")

</div>

Currently, deleting a custom field (tables `user_fields` and `user_fields_options` if its `field_type` is `dropdown`) doesn’t delete the actual values for the users (table `user_custom_fields`), so a quick (but potentially dangerous: backup first) workaround is to:

1. Manually create a new custom field
2. Replace the new id `user_fields` with the old one (this requires admin access to the database): `UPDATE user_fields SET id=1 WHERE id=3;` (assuming 3 is the new id and 1 is the old one)
3. If the field was a dropdown, you’d have to do a similar thing in `user_field_options`
4. If any users signed up for your site and filled out the new field before you fixed it (or if any existing user filled out the new field), you’d also have to fix those.

---

_[View the full topic](https://meta.discourse.org/t/can-i-undelete-a-custom-user-field/102255)._
