Firefox Default Value Bug? The Work Around


We recently encountered a strange bug while working with Firefox in our MacOS development environment. This environment runs Apache 2.4.54, PHP 8.1.8, and MariaDB 10.8.3. The tested browsers are:

  • Firefox 102.0.1
  • Safari 15.6
  • Chrome 103.0.5060.134
  • Firefox Developer Edition 103.0b9

Here's the issue:

While working on a new product release, we modified a form that was first created on August 30, 2021. The form has been working beautifully but needed a modification to support post content types, i.e., Block vs. Legacy.

To implement this feature, we added a new radio to the form using Formidable 5.4.2. A default value was set for this radio button, after we tried a toggle field with a default value set. Firefox did not display the default value for either of these new fields. The default values worked as they always have on the fields that were already on the form. It just didn't work for the new fields.

What makes this behavior suggestive of a Firefox bug is the fact that the new field default value works in all the other tested browsers. There are no errors being generated anywhere.

To troubleshoot this we first examined the field data in wp_frm_fields to compare old radio button configuration data to the new and the result is that nothing has changed in the data assembly and storage.

Next we tried Firefox in troubleshoot mode. Same problem. Last came a full refresh of Firefox. Same problem. Firefox is not setting the default values on new fields for old forms and we can't figure out why. It also won't display new default values for old fields.

Since we couldn't determine the root cause for this problem, we opened bug reports with both Mozilla and Strategy 11, although we sincerely doubt that the issue lies within the Formidable form, which works in every other tested browser. We wanted to make sure Strategy 11 received a heads-up in case others users start experiencing this issue.

Mozilla provided Firefox 103 Beta to test. Installing the Beta and running triggered an immediate update to 103.0 with the Beta designation removed. It fixed the radio button default value issue, but not other fields.

The first image is Firefox Developer Edition that displays default values correctly. This is the same result as Safari and Chrome. The second image is the same form in Firefox 103.0.

Image of form as displayed by Firefox Developer Edition
Firefox Developer Edition 103.0b9
Image of form as displayed by Firefox Version 103
Firefox 103.0

The function is an old field where a default value has been added. The radio buttons are fixed. The toggle button is a new field. It does not show "Block" as active even though "Block" is the default value. Formidable's generated code is correct in every case.

Work Around

This jQuery snippet is the workaround we developed for the radio buttons. It can be modified to work with other field types.

Latest Updates

The form works fine in Firefox when first migrated into a new instance WordPress instance the Formidable's Export/Import process. Even after import, adding new fields to the imported form fails to work in Firefox.

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *