wordpress-fieldmanager
wordpress-fieldmanager copied to clipboard
Render display_if content only when requested
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_ifcontent in JS instead of HTML. When displaying, build the HTML node. - Load the
display_ifcontent via ajax.