Forums › Forums › Search & Filter Pro › Plugin limits number of options in Post Meta Fields
Tagged: fields, limits, post meta, search form
- This topic has 2 replies, 2 voices, and was last updated 8 years, 1 month ago by Anonymous.
-
Anonymous(Private) October 28, 2016 at 3:09 pm #67036
I’m building a search form for a custom content type and have a few post meta relationship fields with a decently large number of options. One field is “State”, so it has 51 entries, and then I have two others with maybe 50 entries each. When I try to add these fields to the form it works fine up until a certain threshold (I’m not sure what the exact number is yet) but when I add additional options and save the form, it deletes all options and fields beyond that threshold, essentially limiting the number of post meta fields and options I can use. I don’t get any error message, it just won’t store additional data.
Is this behavior a feature of the plugin? Or are you aware of some server setting that may be causing this? My office just purchased this, but if we’re going to continue using this plugin, we need the ability to search on more fields.
Trevor(Private) October 28, 2016 at 3:20 pm #67039This may be WordPress/PHP behavior. Choices in forms typically need 10-20 PHP ‘input vars’ to store into the database. A default PHP install on a server sets max_input_vars to 1000. Divide that by (say) 20 and you get 50 choices that can be saved.
The method you should use to increase this depends on your hosting. If you have control over php.ini (for example, most VPS or dedicated server owners do), you can set it in there. Else I think it can be set in the .htaccess file in your web server. This issue arises a lot with complex menus as well.
Please note that S&F Pro does not fully support relationship fields in ACF, but the next version does (I have a development version of that, if you need it), which we will release in a few days.
-
AuthorPosts