wordpress-fieldmanager icon indicating copy to clipboard operation
wordpress-fieldmanager copied to clipboard

Render display_if content only when requested

Open mboynes opened this issue 8 years ago • 0 comments

Forms can get out of hand quickly and easily when you use display_if to create content entry workflows. When you build these complex trees, especially ones with repeatables, it takes very little effort for the form to surpass 1,000 input variables. Depending on the server's PHP configuration, a POST of this size could get truncated and data lost.

Presently, anything behind display_if is present in the form, and therefore submitted with the form, but hidden via CSS. One possible solution to this problem would be to build a way to render the display_if content only when requested. Here are a couple ideas to accomplish that:

  • One way or another, load the display_if content in JS instead of HTML. When displaying, build the HTML node.
  • Load the display_if content via ajax.

mboynes avatar Jun 26 '17 17:06 mboynes