Page Container not keeping fields

kgriffin 16 Aug, 2015
Hi-

I am trying to put together a multi-page form using page containers. I originally created 2 pages - the first the form itself, the second a confirmation page. The first page held a custom code field, multiple text fields, check box sets, text areas and fieldset containers and radio buttons. However, when I saved the form, the first page container only had two fields, a custom code and a text field. Everything else was outside the container. The second page had a custom field and a div container for two buttons. So I thought well maybe for some reason the page can only accept two elements. I then placed a div container in the first page to hold all the fields below the custom code.

When I saved this time, the div container in the first page held the first 7 fields, all text, and the rest of the fields, fieldset containers, etc. were not only outside the div container, but outside the page container. SO, I then added a third page to hold the remainder of the form and inserted it between the first page and the confirmation page and added additional next buttons in. I saved the form again and the new second page ended up with only a set of check boxes. Everything else was outside the container.

I then tried to move the page breaks manually within the code provided, but that did nothing.

It seems there is a limit as to how much and perhaps what you can insert into a page container. I tried everywhere to find this issue discussed, but I did not find it in FAQs or in forums. Is this a bug or is there documentation somewhere that explains more clearly how page containers are supposed to work?

Thanks.
kgriffin 16 Aug, 2015
I tried changing the containers to divs to see what would happen. While a div holds more, I am still getting elements kicked out on save.
GreyHead 17 Aug, 2015
Hi kgriffin,

Do you have quotes, spaces or any other special characters in any of your element names or ids? Or possibly quotes in the labels?

Bob
kgriffin 17 Aug, 2015
I had underscores in a few id's and names and removed them. I had parentheses and colons in labels and removed them. Though neither of these reflected how the fields were split between what remained in the container and what didn't. I tried to put my form elements in a page container and save it and all of them were spit out. I thought maybe it was not happy there was only one page, so I added a second page with a couple of buttons. Saved it again. The second page with the two buttons is fine. The first page spit out everything but the first five elements (one custom code, which is html only, and four text fields).
kgriffin 17 Aug, 2015
I have no idea if this has anything to do with it, but when I open the form to edit it or save the form I get this in Chrome's console:


Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.

Uncaught Error: Syntax error, unrecognized expression: #general-{N}
gb.error @ jquery.min.js:2
gb.tokenize @ jquery.min.js:2
gb.select @ jquery.min.js:2
gb @ jquery.min.js:2
m.fn.extend.find @ jquery.min.js:2
m.fn.init @ jquery.min.js:2
e.fn.init @ jquery-migrate.min.js:2
m @ jquery.min.js:2
(anonymous function) @ bootstrap.min.js:8
(anonymous function) @ jquery.min.js:2
m.extend.map @ jquery.min.js:2
m.fn.m.map @ jquery.min.js:2
t.refresh @ bootstrap.min.js:8
t @ bootstrap.min.js:8
(anonymous function) @ bootstrap.min.js:8
m.extend.each @ jquery.min.js:2
m.fn.m.each @ jquery.min.js:2
e.fn.scrollspy @ bootstrap.min.js:8
processScrollInit @ index.php?option=com_chronoforms5&act=edit&id=1:7293
(anonymous function) @ index.php?option=com_chronoforms5&act=edit&id=1:7278
m.Callbacks.j @ jquery.min.js:2
m.Callbacks.k.fireWith @ jquery.min.js:2
m.extend.ready @ jquery.min.js:2
J @ jquery.min.js:2
GreyHead 17 Aug, 2015
Hi kgriffin,

Hmmm underscores, colons and parentheses are unlikely to cause problems.

I wonder if this is a different symptom from the max_input_vars limit. Please will you check on the site System Info page what that is set to.

Also please take a Form Backup using the icon in the Forms Manager and post it here and I'll take a closer look.

Bob
kgriffin 17 Aug, 2015
I checked max_input_vars. It was set at 1000. I increased it to 3000 and still got the same behavior. I have attached the form.
kgriffin 19 Aug, 2015
Hi-

Any news on what may be happening here?

Thanks.
GreyHead 19 Aug, 2015
Hi kgriffin,

I can see that there are a bunch of elements that are no longer in a page container - but I don't have any problem in adding or moving them on my site. That leaves me still suspicious of a server security setting on your site.

I've attached a copy of the form with the elements copied and pastes back into a page container. (Note that when you restore this it will need to be 'Published' before you can see it.

Bob
kgriffin 19 Aug, 2015
Could it be caused by a conflict with another extension?
kgriffin 19 Aug, 2015
I uploaded the form and made some changes, including adding more elements to the pages and everything saved just fine. Thank you!
kgriffin 19 Aug, 2015
Answer
I started having problems again and so I upped the max_input_vars to 5000. That fixed it. You were right. Thank you for all your help!
This topic is locked and no more replies can be posted.