formulize
formulize copied to clipboard
Option to show all fields on the form when in read-only mode
Hi Julian,
I notice with the recent updates, it now hides unanswered rows on a form entry by default when in read-only mode. One of the projects I work on prefers to still see the unanswered rows. Is it possible to add option to toggle the row rendering?
Interesting. This may be a side effect of some other changes. There were some issues where nonexistent elements would find their way into the rendering process, and by ignoring elements that are empty, that solves that problem.
But you have valid elements that are empty. I will experiment and see what I can figure out.
In the meantime, I believe you can hack this very easily in the drawElements method of the formulize_themeForm method in the /modules/formulize/include/formdisplay.php file. Yes it should be in the class folder, lots of refactoring on the to-do list.
In that method is a line that returns nothing if the element is empty, or if the rendered element is empty. Or both. You could comment that out and see if you get the behaviour you want. Then you're maintaining a tiny fork though for the time being. This is one thing that makes the Ocands update a challenge. So we'll aim to avoid the need for a hack here long term.
--Julian
Thanks for the explanation, Julian. I comment out line 414 in file modules/formulize/include/formdisplay.php and able to get those rows to re-display now.