Title: Remove custom fields (and save empty values)
Last modified: March 15, 2018

---

# Remove custom fields (and save empty values)

 *  Resolved [ladygeekgeek](https://wordpress.org/support/users/ladygeekgeek/)
 * (@ladygeekgeek)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/remove-custom-fields-and-save-empty-values/)
 * Hi I’ve added custom registration fields successfully as instructed on [https://docs.restrictcontentpro.com/article/1720-creating-custom-registration-fields](https://docs.restrictcontentpro.com/article/1720-creating-custom-registration-fields)
 * All is well, until I try to edit on profile pages (backend and member profile
   update). Deleted fields are not removed. There seems to be some text missing 
   from your documentation on this page – just under Step 5
 * If you want customers to be able to remove the fields (and save empty values)
   then ….
    [https://docs.restrictcontentpro.com/article/1720-creating-custom-registration-fields](https://docs.restrictcontentpro.com/article/1720-creating-custom-registration-fields)
 * Many thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fremove-custom-fields-and-save-empty-values%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [ladygeekgeek](https://wordpress.org/support/users/ladygeekgeek/)
 * (@ladygeekgeek)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/remove-custom-fields-and-save-empty-values/#post-10077479)
 * Think I solved it:
 *  if( ! empty( $_POST[‘rcp_youtube’] ) ) {
    update_user_meta( $user_id, ‘rcp_youtube’,
   esc_url_raw( $_POST[‘rcp_youtube’] ) ); } else { // Delete the user meta if the
   box is unchecked. delete_user_meta( $user_id, ‘rcp_youtube’ ); }
 *  [John Parris](https://wordpress.org/support/users/mindctrl/)
 * (@mindctrl)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/remove-custom-fields-and-save-empty-values/#post-10078304)
 * Hi [@ladygeekgeek](https://wordpress.org/support/users/ladygeekgeek/),
 * Glad to hear you figured it out! 🙂
 * If you have any more questions, shoot us an email [here](https://restrictcontentpro.com/support).(
   the wordpress.org forum policy doesn’t allow us to support the Pro version here)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove custom fields (and save empty values)’ is closed to new replies.

 * ![](https://ps.w.org/restrict-content/assets/icon.svg?rev=3529325)
 * [Membership Plugin - Kadence Memberships](https://wordpress.org/plugins/restrict-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/restrict-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/restrict-content/)
 * [Active Topics](https://wordpress.org/support/plugin/restrict-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restrict-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restrict-content/reviews/)

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)

 * 2 replies
 * 2 participants
 * Last reply from: [John Parris](https://wordpress.org/support/users/mindctrl/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/remove-custom-fields-and-save-empty-values/#post-10078304)
 * Status: resolved