Support Forum
Hi Meta Box,
Making my custom field worked almost fine until now. I have it applied to a custom post type and also made it into a front-end user submission form to show on the front-end. Since just a few minutes I can't see any of the form fields when making/editing a post from the post type to which I applied my custom fields group. Why?
Is there maybe a maximum custom fields amount or some other limit for making a custom field group in Meta Box that I am not aware of?
weirdly,
when i add another custom field it changes the settings of the custom fields group and applies it to WordPress' standard post type instead of the custom post type I have it set to... . What is going on?
Yeah there is really something strange happening. It feels like I am reaching some maximum size limit of a custom field group. Perhaps something with maximum row sizes? I have no clue, I'm just a beginner.
One indication of me hitting some maximum field group size is this: After I deleted one form field, I can again correctly associate the custom field group to the right custom post type as per usual (through custom field group > settings > location, update).
This is literally the only change needed to allow it again.
However, setting a custom setting for the form field group, like 'geo' = 'true', ... yes well this doesn't get saved. Again it seems I hit some sort of maximum limit or something. And indeed, after I deleted now delete just one more form field, suddenly saving this geo = true custom setting is possible again. So weird!
Now I add a few more form fields. I am just randomly making a Icon, Url, Fieldset Text, and Date field type. I hit 'update', my field group refreshes and guess what? Only the icon and url field types are now saved. The Fieldset Text and Date fields are not saved. If I try adding another field, this time I randomly used the 'password' field type, and then press 'update' again, this field is also not showing.
Needless to say, hitting this limit is a huge problem. I can't add several fields. I really need these as I will be using this entire form field group for front-end-user-submissions.
Please let me know how I can change the max size for a custom field group... .
Hello John,
You can try to follow this tutorial to increase the PHP setting max_input_vars
to fix the issue
https://metabox.io/wordpress-custom-fields-not-saving-increase-max-input-vars/
Let me know how it goes.
Dear Peter, Thank you so much! This worked! Increasing the max_input_vars value to something higher allows me to add my form with some more form fields.
I did have a small issue with the tutorial you linked to, and I have a work around. I learned it is wise to not have a phpinfo.php that the public can reach because it gives away site configuration information to possible attackers. I could also not locate the php.ini file through something like Filezilla. The solution for both issues was to go to my webhosting environment. There I could find the max_input_vars value through (and this might be different for everyone, depenidng on how your host sets it up) 'Manage your website' > there was a sidebar ‘Advanced’ > PHPinfo. There you can see ‘max_input_vars´. You can change it through Advanced > PHP configuration > PHP options > maxInputVars. I set it from 5000 to 10000, and tested the form and it now works. Thanks Peter and Meta Box!
This topic can close.