# Submitted value () does not match expected value ($XXX) \[RESOLVED\]

**URL:** <https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494>\
**Category:** Get Help\
**Tags:** pricing-fields, wpautop\
**Created:** [November 7, 2026, 8:35am UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494 "2026-11-07T08:35:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason1](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jason1](https://community.gravityforms.com/u/jason1)\
**Post date:** [November 7, 2026, 8:35am UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/1 "2026-11-07T08:35:50Z")

</div>

Hi all!

I am getting this error on my WP site as of today. I am always on the most recent version and I have read several posts about this. The only thing that applies to me is one conditional field. BUT..I have removed the conditional format and there is still an issue.

My form is very very simple.

Please assist as this is keeping customers from ordering.

Order form: [Order - The Squeal Killer](https://thesquealkiller.com/order/)

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:** [November 7, 2026, 7:52pm UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/2 "2026-11-07T19:52:45Z")

</div>

Hi Jason,

I checked your order form. The problem is not the conditional logic.

Your theme adds a `<br />` tag inside the form HTML (WordPress “wpautop” runs on the form after it is rendered). In the Total field, this `<br />` sits between the total text and the hidden input that stores the total. So the script writes the total into the `<br />` and the real input stays empty. When the form is submitted, Gravity Forms sees an empty total and shows “Submitted value () does not match expected value”.

**Easiest fix:**

1. Go to _Forms \> your Order form \> Settings_.
2. In “Form Layout”, turn off “Enable legacy markup”.
3. Save and test an order.

If you want to keep legacy markup, add this as a mu-plugin (`wp-content/mu-plugins/gf-total-fix.php`):

```php
  add_filter( 'gform_field_content', function ( $content, $field ) {
      if ( $field->type === 'total' ) {
          $content = preg_replace( '#</span>\s+<input#', '</span><input', $content );
      }
      return $content;
  }, 10, 2 );

```

Also, your theme loads a very old jQuery (1.10.2) from Google instead of the WordPress one. It is not the cause here, but it can break other things, so please ask your theme developer to remove that.

Let me know if it works.

---

<div class="post-metadata">

**Author:** ![jason1](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jason1](https://community.gravityforms.com/u/jason1)\
**Post date:** [November 7, 2026, 11:10pm UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/3 "2026-11-07T23:10:15Z")

</div>

Hey Faisal!

Thank you for the suggestions.

I removed the legacy markup. However, it changed a whole hosts of things like alignment, loss of graphics.

So…not good and now I don’t see that as an option i.e. to put back Legacy markup.

Please explain what you mean by add a mu-plugin. Where? How?

Thanks so much sir!

---

<div class="post-metadata">

**Author:** ![jason1](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jason1](https://community.gravityforms.com/u/jason1)\
**Post date:** [November 9, 2026, 3:18pm UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/4 "2026-11-09T15:18:23Z")

</div>

Anyone else? Right now my site is messed up and I don’t have a way to fix it because the legacy option is gone after I turned it off.

Thanks

---

<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:** [November 9, 2026, 6:09pm UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/5 "2026-11-09T18:09:53Z")

</div>

Hi Jason,

Sorry about the layout change. Once legacy markup is turned off, Gravity Forms hides that setting, so you can’t turn it back on from the form settings. But we can turn it back on with a small code file, and the same file also fixes the Total error.

A “mu-plugin” (must-use plugin) is a PHP file that WordPress loads automatically. You don’t need to activate it.

**How to add it:**

1. Open your site files with your hosting File Manager (cPanel, etc.) or FTP.
2. Go to the `wp-content` folder.
3. If there is no `mu-plugins` folder inside it, create one. The name must be exactly `mu-plugins`.
4. Inside `mu-plugins`, create a new file named `gf-order-form-fix.php`.
5. Paste this code into the file and save it:

```php
<?php
/**
 * Plugin Name: GF Order Form Fix
 */

// Turn legacy markup back on for form ID 1 (your Order form).
add_filter( 'gform_enable_legacy_markup_1', '__return_true' );

// Fix the empty Total value caused by the extra <br /> tag.
add_filter( 'gform_field_content', function ( $content, $field ) {
	if ( $field->type === 'total' ) {
		$content = preg_replace( '#</span>\s+<input#', '</span><input', $content );
	}
	return $content;
}, 10, 2 );

```

1. If you use a cache plugin or server cache, clear it.
2. Open the order page and test an order.

Your form should look like before, and the Total should now submit correctly.

If you can’t access the files, you can install the free “Code Snippets” plugin and add the same code there (without the first `<?php` line), set to “Run everywhere”.

Let me know how it goes.

---

<div class="post-metadata">

**Author:** ![jason1](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jason1](https://community.gravityforms.com/u/jason1)\
**Post date:** [November 9, 2026, 6:42pm UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/6 "2026-11-09T18:42:32Z")

</div>

Man… you are a lifesaver. THANK YOU!!

Worked 100% and the site/order form is back to 100%.

A pint on me if you are ever in my area 🙂

---

<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:** [November 9, 2026, 9:15pm UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/7 "2026-11-09T21:15:21Z")

</div>

Hi Jason,

You’re very welcome! I’m glad the fix worked and that your site and order form are back to normal. 🙂

If you’d like to buy me a coffee, you can do so here: [https://buymeacoffee.com/faisalahammad](https://buymeacoffee.com/faisalahammad)

Thanks again for the kind words! 🤝

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [November 10, 2026, 8:28am UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/8 "2026-11-10T08:28:30Z")

</div>

FYI, legacy markup will be removed in version 4.0, which is currently in development for release early next year, so I recommend finding the time to clone your site to a staging or development site and working on resolving any CSS issues with the modern markup.

> [@Preparing Your Sites for Gravity Forms Legacy Markup EOL](https://community.gravityforms.com/t/preparing-your-sites-for-gravity-forms-legacy-markup-eol/19488):
>
> The Announcement Gravity Forms has announced a significant change coming with version 4.0: the [complete removal of legacy markup support](https://docs.gravityforms.com/about-legacy-markup/). This marks the end of an era that began in 2009 when the original markup structure was introduced. Though the modern markup standard has been available since version 2.5 (released April 2021), many sites still rely on the legacy version for their forms. First, A Reassurance: While this change is significant, many Gravity Forms users won’t be affected at all.…

---

<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:** [November 11, 2026, 8:29am UTC](https://community.gravityforms.com/t/submitted-value-does-not-match-expected-value-xxx-resolved/20494/9 "2026-11-11T08:29:07Z")

</div>

Closed on November 11, 2026, 8:29am UTC

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