File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ <!--
2+ * Gravity Perks // Entry Blocks // Hide Empty Columns on Edit
3+ * https://gravitywiz.com/documentation/gravity-forms-entry-blocks/
4+ *
5+ * If you include multiple Entry Blocks on the same page and click to view or edit a single entry,
6+ * only the block to which that entry belongs will be visible. If you have each Entry Block displayed
7+ * in its own column, this will render any other column empty in these views.
8+ *
9+ * Use this snippet to automatically find empty columns and remove them, making the remaining column
10+ * full width.
11+ *
12+ * Instructions:
13+ *
14+ * 1. Add an HTML block to your page.
15+ * 2. Copy the snippet into that block.
16+ -->
17+ < script >
18+ document . querySelectorAll ( '.wp-block-column' ) . forEach ( element => {
19+ if ( element . textContent . trim ( ) === '' ) {
20+ element . remove ( ) ;
21+ }
22+ } ) ;
23+ </ script >
You can’t perform that action at this time.
0 commit comments