# Mapping booleans to custom user profile fields using User Registration add-on

**URL:** https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157
**Category:** Get Help
**Tags:** user-registration, pods
**Created:** [March 16, 2026, 9:16pm UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157 "2026-03-16T21:16:22Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![adamrice](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adamrice/32/17162_2.png) [@adamrice](https://community.gravityforms.com/u/adamrice)
#### Post date: [March 16, 2026, 9:16pm UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157/1 "2026-03-16T21:16:22Z")

</div>

I have a form to update user profiles. The profile has some additional fields (created in Pods), including some booleans; I’ve created equivalent form fields.

I am trying to maps the form fields to the profile fields, and these booleans don’t seem to make it through—in fact, I need to enter the field names by hand as “custom metas” because they do not appear in the popup list.

---

<div class="post-metadata">

### Author: ![faisalahammad](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/faisalahammad/32/13948_2.png) [@faisalahammad](https://community.gravityforms.com/u/faisalahammad)
#### Post date: [March 18, 2026, 3:00pm UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157/2 "2026-03-18T15:00:39Z")

</div>

Hi there,

Could you please share the more details including fields, meta keys, Gravity Forms export copy so I can try to help you out?

If you want to know more about me, I’m here over 3 years and helping peoples, also contributed to the Pods plugin in recent time. You can check from below.

> <https://github.com/pods-framework/pods/pull/7487>
>
> \## Summary
> 
> Fixes #7465 - Repeatable WYSIWYG fields become uneditable after Wo…rdPress content import, causing React error #185 ("Maximum update depth exceeded").
> 
> \## Problem Analysis
> 
> \### 🔴 The Bug
> 
> When editing a post with repeatable WYSIWYG fields (using Quill editor) that were imported via WordPress XML Import, the fields become completely uneditable and the browser console shows:
> 
> \`\`\`
> Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185
> \`\`\`
> 
> This error means \*\*"Maximum update depth exceeded"\*\* - an infinite re-render loop in React.
> 
> \### 🔍 Root Cause
> 
> The issue is in \`ui/js/dfv/src/fields/wysiwyg/index.js\` where ReactQuill's \`onChange\` handler directly calls \`setValue\`:
> 
> \`\`\`jsx
> // ❌ BEFORE - Causes infinite loop
> \<ReactQuill
> value={ value || '' }
> onChange={ setValue } // Problem here!
> ...
> /\>
> \`\`\`
> 
> \*\*Why this causes an infinite loop:\*\*
> 
> 1. \*\*ReactQuill mounts\*\* with imported HTML content → fires \`onChange(content, delta, source)\`
> 2. \*\*\`setValue(content)\` is called\*\* → updates React state
> 3. \*\*Component re-renders\*\* with the "new" value (same content, but React sees it as changed)
> 4. \*\*ReactQuill detects value prop change\*\* → fires \`onChange\` again
> 5. \*\*Loop continues indefinitely\*\* → React Error #185
> 
> The \`source\` parameter in ReactQuill's \`onChange\` tells us \*why\* the change happened:
> \- \`'user'\` = User typed/edited content
> \- \`'api'\` = Programmatic change (like setting initial value)
> \- \`'silent'\` = Internal change that shouldn't trigger events
> 
> \### ✅ The Fix
> 
> Only call \`setValue\` when the change was initiated by the user:
> 
> \`\`\`jsx
> // ✅ AFTER - No infinite loop
> \<ReactQuill
> value={ value || '' }
> onChange={ ( content, delta, source ) =\> {
> // Only update state for user-initiated changes
> // to prevent infinite loops on mount/programmatic updates
> if ( source === 'user' ) {
> setValue( content );
> }
> } }
> ...
> /\>
> \`\`\`
> 
> This is the \[recommended approach from react-quill documentation\](https://github.com/zenoamaro/react-quill#controlled-mode-caveats).
> 
> \## Code Changes
> 
> \### Before/After Diff
> 
> \`\`\`diff
> \<ReactQuill
> value={ value || '' }
> onBlur={ () =\> setHasBlurred() }
> \- onChange={ setValue }
> + onChange={ ( content, delta, source ) =\> {
> + // Only update state for user-initiated changes
> + // to prevent infinite loops on mount/programmatic updates
> + if ( source === 'user' ) {
> + setValue( content );
> + }
> + } }
> theme="snow"
> modules={ { toolbar: QUILL\_TOOLBAR\_OPTIONS } }
> readOnly={ toBool( readOnly ) }
> /\>
> \`\`\`
> 
> \### Files Changed
> 
> | File | Change |
> |------|--------|
> | \`ui/js/dfv/src/fields/wysiwyg/index.js\` | Fixed \`onChange\` handler to check \`source\` parameter |
> 
> \## Testing
> 
> \### Automated Tests
> \- ✅ All 42 Jest tests pass
> \- ✅ Production build compiles successfully
> 
> \### Manual Testing
> \- ✅ Imported the reporter's Pod configuration and WordPress XML export
> \- ✅ Verified repeatable WYSIWYG fields are now editable
> \- ✅ No React errors in browser console
> \- ✅ Content saves and persists correctly
> 
> \## How to Test
> 
> 1. Install \[this patched plugin zip\](https://github.com/user-attachments/files/24976019/pods-fix-7465.zip)
> 2. Import the Pod configuration from the issue
> 3. Import the WordPress XML export from the issue
> 4. Edit the imported "tuote" post type items
> 5. Verify WYSIWYG fields are editable with no console errors
> 
> \## Screenshots
> 
> \*\*Before:\*\*
> \<img width="2554" height="1323" alt="image" src="https://github.com/user-attachments/assets/0226bbd6-faef-4fb9-8604-f35b5ec65b55" /\>
> 
> \*\*After:\*\*
> \<img width="3840" height="1926" alt="25B26829-6AF3-4ACD-BB01-BA20AD82630A" src="https://github.com/user-attachments/assets/2078e4f3-f1ff-4729-ba00-8010ed8529cc" /\>
> 
> \## Related
> 
> \- Issue: #7465
> \- React Error Reference: https://reactjs.org/docs/error-decoder.html?invariant=185
> \- react-quill Controlled Mode: https://github.com/zenoamaro/react-quill#controlled-mode-caveats

> <https://github.com/pods-framework/pods/pull/7485>
>
> \## Summary
> 
> This PR fixes PHP warnings that flood the log file when saving a p…ost with a relationship field that has the "Sync associated taxonomy with this relationship" option enabled, but no bidirectional relationship (sister\_id) is configured.
> 
> Fixes #7477
> 
> \## The Problem
> 
> When \`pick\_sync\_taxonomy\` is enabled but there is no bidirectional relationship set up:
> \- \`$related\_pod\` is \`null\`
> \- \`$related\_field\` is \`null\`
> 
> The original code at line 1959-1967 had this condition:
> 
> \`\`\`php
> if (
> (
> empty( $related\_field )
> || empty( $related\_pod )
> )
> && empty( $options\[static::$type . '\_sync\_taxonomy' \] )
> ) {
> return;
> }
> \`\`\`
> 
> This means the function only returns early if BOTH conditions are true:
> 1. No bidirectional relationship exists, AND
> 2. No taxonomy sync is enabled
> 
> So when taxonomy sync IS enabled (but no bidirectional relationship exists), the code continues past this check and then tries to access \`$related\_pod\['type'\]\` on line 1974, which triggers the PHP warning.
> 
> \## The Solution
> 
> Move the taxonomy sync logic to run first (it does not need \`$related\_pod\` or \`$related\_field\`), then add an early return if no bidirectional relationship exists.
> 
> \### Before
> 
> \`\`\`php
> if (
> (
> empty( $related\_field )
> || empty( $related\_pod )
> )
> && empty( $options\[static::$type . '\_sync\_taxonomy' \] )
> ) {
> return;
> }
> 
> // Handle the bi-directional relationship updates.
> 
> $no\_conflict = true;
> 
> // Only check no conflict mode if this isn't the current pod type.
> if ( $related\_pod\['type'\] !== $pod\['type'\] ) { // \<-- PHP Warning here!
> $no\_conflict = pods\_no\_conflict\_check( $related\_pod\['type'\] );
> }
> 
> // ... more bidirectional code ...
> 
> // Handle syncing of taxonomy terms.
> if ( ! empty( $pod\['type'\] ) && 'post\_type' === $pod\['type'\] && ! empty( $options\[static::$type . '\_sync\_taxonomy' \] ) ) {
> // taxonomy sync code
> }
> 
> if ( ! $no\_conflict ) {
> pods\_no\_conflict\_off( $related\_pod\['type'\] ); // \<-- PHP Warning here too!
> }
> \`\`\`
> 
> \### After
> 
> \`\`\`php
> // Handle syncing of taxonomy terms first (doesn't require bidirectional relationship).
> if ( ! empty( $pod\['type'\] ) && 'post\_type' === $pod\['type'\] && ! empty( $options\[static::$type . '\_sync\_taxonomy' \] ) ) {
> // taxonomy sync code - runs independently
> }
> 
> // Exit early if no bidirectional relationship to handle.
> if ( empty( $related\_field ) || empty( $related\_pod ) ) {
> return;
> }
> 
> // Handle the bi-directional relationship updates.
> // Now we are sure $related\_pod and $related\_field are not null
> 
> $no\_conflict = true;
> 
> if ( $related\_pod\['type'\] !== $pod\['type'\] ) {
> $no\_conflict = pods\_no\_conflict\_check( $related\_pod\['type'\] );
> }
> 
> // ... rest of bidirectional code ...
> 
> if ( ! $no\_conflict ) {
> pods\_no\_conflict\_off( $related\_pod\['type'\] );
> }
> \`\`\`
> 
> \## Why This Works
> 
> 1. Taxonomy sync does not need \`$related\_pod\` or \`$related\_field\` - it only uses \`$pod\`, \`$options\`, and \`$value\_ids\`
> 2. By moving it to the top, it runs first regardless of whether a bidirectional relationship exists
> 3. The early return after taxonomy sync prevents the bidirectional code from executing when \`$related\_pod\` is null
> 4. Bidirectional relationships still work exactly as before when properly configured
> 
> \## Testing Done
> 
> \- Tested with Pick field related to taxonomy with "Sync taxonomy" enabled
> \- No bidirectional relationship (sister\_id) configured
> \- Saved post with taxonomy terms selected
> \- Verified: No PHP warnings in debug.log
> \- Verified: Taxonomy terms sync correctly to the post
> \- Also tested with bidirectional relationship enabled to make sure that still works
> 
> \## Files Changed
> 
> \- \`classes/fields/pick.php\` - Reordered logic in the \`save()\` method
> 
> \## Plugin zip
> \[pods-fix-7477.zip\](https://github.com/user-attachments/files/24968327/pods-fix-7477.zip)

---

<div class="post-metadata">

### Author: ![adamrice](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adamrice/32/17162_2.png) [@adamrice](https://community.gravityforms.com/u/adamrice)
#### Post date: [March 18, 2026, 5:10pm UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157/3 "2026-03-18T17:10:30Z")

</div>

Faisal–

Thanks. I am appending a screenshot of the relevant Pods fields. The Gravity Forms export is a little too big to include here, so I’ve uploaded it [here](https://8stars.org/misc/gravityforms-export-2026-03-18.json).

Although Gravity Forms lets you place multiple checkboxes under a single title, for clarity I’ve created a separate title for each checkbox in the form.

Let me know if I can provide any more information.

 ![Screenshot 2026-03-18 at 11.56.14](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/3X/9/7/970925c61567c75f1f0edf4dff5ac8f26c27d8c6.png)

---

<div class="post-metadata">

### Author: ![faisalahammad](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/faisalahammad/32/13948_2.png) [@faisalahammad](https://community.gravityforms.com/u/faisalahammad)
#### Post date: [April 1, 2026, 8:51am UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157/4 "2026-04-01T08:51:28Z")

</div>

Hi @adamrice

Sorry for the delay. I’ve already resolved the issue for the single checkbox item. Could you please share your all Pods by exporting so I can import on my end and give you a complete solution?

> **[WP All Import & Export - Free & Pro Versions - Pods Docs](https://docs.pods.io/plugins/wp-all-import-export/)**
>
> WP All Import & Export is an extremely powerful importer/exporter that makes it easy to import/export any XML or CSV file to WordPress.

Thank you

---

<div class="post-metadata">

### Author: ![faisalahammad](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/faisalahammad/32/13948_2.png) [@faisalahammad](https://community.gravityforms.com/u/faisalahammad)
#### Post date: [April 1, 2026, 11:15am UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157/5 "2026-04-01T11:15:03Z")

</div>

Hi again,

I’ve resolved the issue. Now you can select the Pods fields under **Gravity Forms \> Settings \> User Registration \> User Meta** , as shown in the screenshot below.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/3X/9/8/981d110723a95caaedd864fe1e800d3872e2049b.png)

After a user is created or updated, the user meta will auto-sync and can be found under the user profile.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/3X/d/f/dff51868f0c44823c00d900b0857ffa6601a6131.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/3X/c/f/cf2311e07f375647f03226f7e2e8593bae8c7efc.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/3X/3/1/31a7a4315212b5e763538ecd8152662e96825975.png)

Please use the following code as an MU-Plugin for now. I plan to release a small plugin later for easier use in the future.

```php
<?php
/**
 * Plugin Name: Gravity Forms + Pods Integration
 * Description: Automatically adds Pods User fields to the User Registration Add-On meta keys list, and properly casts mapped Checkbox values into strict booleans (1/0) for Pods boolean fields.
 * Author: Faisal Ahammad
 */

// 1. Add Pods User fields to the GF User Registration Meta Key dropdown
add_filter( 'gform_user_registration_user_meta_options', function( $keys ) {
	if ( ! function_exists( 'pods_api' ) ) {
		return $keys;
	}

	$api = pods_api();
	// Load the Extended User pod (if it exists)
	$pod = $api->load_pod( ['name' => 'user'], false );
	if ( ! empty( $pod ) && ! empty( $pod['fields'] ) ) {
		if ( ! is_array( $keys ) ) {
			$keys = [];
		}
		
		foreach ( $pod['fields'] as $field ) {
			$keys[] = [
				'label' => '[Pods] ' . $field['label'],
				'name' => $field['name'],
				'value' => $field['name'],
				'required' => false
			];
		}
	}

	return $keys;
}, 10, 1 );

// 2. Intercept boolean values to ensure they save as 1/0 for Pods
add_filter( 'gform_user_registration_meta_value', function( $value, $meta_key, $meta, $form, $entry ) {
	if ( ! function_exists( 'pods_api' ) ) {
		return $value;
	}

	$api = pods_api();
	$pod = $api->load_pod( ['name' => 'user'], false );
	if ( empty( $pod ) || empty( $pod['fields'] ) || empty( $pod['fields'][$meta_key] ) ) {
		return $value; // Not a Pods field or not registered.
	}

	$field = $pod['fields'][$meta_key];

	// Only apply processing to boolean fields
	if ( 'boolean' === $field['type'] ) {
		if ( is_array( $value ) ) {
			$value = empty( $value ) ? 0 : 1;
		} else {
			// In Gravity Forms, an unchecked string is usually empty "".
			// A explicitly false string could be "false" or "no". 
			// Valid labels are considered truthy.
			$value = ( empty( $value ) || '0' === $value || false === filter_var( $value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) ) ? 0 : 1;
		}
	}

	return $value;
}, 10, 5 );

```

You can also get the source code from here:

> <https://gist.github.com/faisalahammad/2e103685f4fe64ddc854ff9fe6cc1662>

MU-Plugin guideline:

> **[Must Use Plugins – Advanced Administration Handbook | Developer.WordPress.org](https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/)**
>
> Must-use plugins (a.k.a. mu-plugins) are plugins installed in a special directory inside the content folder and which are automatically…

Give it a try, and let me know how that goes! 😄

Best regards,  
Faisal

---

<div class="post-metadata">

### Author: ![adamrice](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adamrice/32/17162_2.png) [@adamrice](https://community.gravityforms.com/u/adamrice)
#### Post date: [April 1, 2026, 12:07pm UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157/6 "2026-04-01T12:07:08Z")

</div>

Thanks very much. I haven’t had a chance to try this out yet, but I appreciate your time and expertise.

---

<div class="post-metadata">

### Author: ![faisalahammad](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/faisalahammad/32/13948_2.png) [@faisalahammad](https://community.gravityforms.com/u/faisalahammad)
#### Post date: [April 1, 2026, 12:34pm UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157/7 "2026-04-01T12:34:49Z")

</div>

You’re welcome.

Please keep me posted about the outcome. 👍

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)
#### Post date: [May 1, 2026, 12:35pm UTC](https://community.gravityforms.com/t/mapping-booleans-to-custom-user-profile-fields-using-user-registration-add-on/20157/8 "2026-05-01T12:35:10Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
