"Add another item" 在 Drupal 7 中的 40 个字段后失败

"Add another item" fails after 40 fields in Drupal 7

我有一个带有 "image" 字段的表单,可以通过单击 "add another item" 按钮添加无限制的图像字段。 40 个图像字段后,我得到一个 ajax 错误 "An error occurred while attempting to process /system/ajax: ajax.form.ajaxSubmit is not a function"。 Ajax 调用失败并返回一些 JS 文件作为响应,这很奇怪。感谢您的想法和建议。

我能想到的解决方法是删除 ajax 调用并使用通常的 POST 方法,通过单击 "add another item" 刷新表单。 Drupal 足够聪明,可以记住用户填写表单的所有其他值。

这可能是由于您发布到 Ajax 调用的输入变量的数量。检查 php.ini 中 'max_input_vars' 的值,然后尝试增加它。