Some Parsing Errors Showing Up

While using the Form Generator Update, errors started showing up. When I looked under the ‘hood’ there were multiple parsing errors showing up on two input fields, business_address_1 and business_address_2. Any update to these fields would remove the existing data (see images below).

For some reason the Generator is adding a space between the business_ and address. This is causing these fields to be ignored due the a mismatch of the field name.

You see that Underline characters were added. I have no idea why… or why there are escapes before quotes in the $_POST

Please remind me not to have what you are having :joy:.

Back to business. What do the field names in your database look like? Can you show a screen shot similar to

Hello Ben!

I checked them and they were fine. Here they are below:

I’m going to go with another page from scratch and see what happens.

After finishing the list and then moving to generating the form, BAM! it did it again.

Interestingly, this wasn’t happening until the latest software update 1.8.1

It looks like the underscore is what’s causing the problem. I have had similar problems with underscores in the past with other implementations. My lesson has been learned and I use exclusively CamelCase for all of my field names. Problems solved.

Edit: Yep, it could be a bug, in fact I do believe that it is a bug.

I’ve used both camels and underscores; but I must say, that the majority of the time, it’s been _'s. For me, I’ve just found _'s a bit easier for me to read.

I’m going to reinstall the 1.8.1 upgrade and see if it continues this foolishness afterward.

I have alerted Patrick to the problem. It is close to 5:00am in the Netherlands so give him a few hours to open his eyes :sleepy:

Some of the updates included…

Thank you very much Ben.

No problem though… I’m heading off to slumberland myself. It’s almost 11 pm in The Bahamas.

What’s really weird is even the placeholder is putting that extra space.

Plus it appears that it is changing this: sc_business_detail.data.detail_business[0].business_address_2 TO this: sc_business_detail.data.detail_business[0][‘business_address_2’], which renders an error: “message”: “Array to string conversion”, “trace”: "#0 [internal function]: exception_error_handler(8, 'Array to string…'

It is not the underscore that is causing the problem, it is the space character that you have in the id/name of the input. Was this generated by the Form generator or did you insert them?

It was generated. I rebuilt the page four times, each with the same result. However, it only happened with the two address fields, i.e, business_address_1.

How are those fields named in your database? with spaces?

we removed the cleaning up because of other requests like from @Dave but seems we have to add it back to at least the naming of the id fields in the form generator

This is a good compromise for us as all our id fields are lowercase. URL Variables in our case have always been lowercase, sessions a mixture, cookies also lowercase. We always appreciate and respect your decisions George.

No spaces anywhere. I only use camels and underscores. :grinning:

Could you send a screenshot of the Bootstrap 4 Form Generator - when you are inspecting the form and you see a list of all fields in there

Here’s the screenshot view…

Did you already fix your spaces problem? As I don’t see any spaces …