I'm using Knack Online Database to create apps. I'm trying to find a way to hide empty space in a cell.
I have a table that has a text formula. The text formula combines multiple fields (question and answers) and separates them using <br>
. This is how i have it set up:
<b>question1</b> answer1
<br>
<b>question2</b> answer2
<br>
<b>question3</b> answer3
<br>
For some records, some of the fields are empty so this is how it results:
<b>question1</b> answer1
<br>
<b></b>
<br>
<b>question2</b> answer2
<br>
In my table, the empty space would show and it would take so much space: Table
I've tried using this code but it didn't work:
$(document).on('knack-view-render.view_2665', function(event, view, data) {
removeWhiteSpaces('kn-input-field_3288');
});
I'm not sure what's the best solution to hide the empty space. Is there a code that I could use to hide the <b></b><br>
if the <b></b>
was empty for this column/field?
removeWhiteSpaces
function doing? Also, could you provide bigger chunk of HTML? Namely, pieces related tokn-input-field_3288
andknack-view-render.view_2665
?