Can't pre-fill form fields with procedure described in Mautic documentation

I just have the same problem, follow all the steps and the form does not seem to auto populate.

I don’t think there is something wrong with my setup. but the form is not reading the url content.

to workaround this issue, I have included the following script in the end of my landing page, this code will do what the documentation is promising to do, add the values in the url paramenters into the form field. keep in mind that I write this down for my particular issue, I have not tested with all the possible scenarios, I know that this script will not populate checkboxes and radiobuttons, for example, because they deal with values differently, if some one is interested in this type of fix I might expand it to cover more scenarios, but this is just a workaround until I find what is wrong with the mautic configuration:

<script>
var __fields = decodeURIComponent(location.search.toString().slice(1)).split("&")

__fields.forEach( param=> {
  const [fieldName, fieldValue ] = param.split("=");  
  const el = document.querySelector(`form *[name="mauticform[${fieldName}]"]`);
  if( !!el ) el.value = fieldValue;
})
</script>