Forum Discussion
cjunior's answer works well if the condition is not user-editable, e.g "Have any nodes been created already?".
I wanted to make the empty table look nicer as well but, in the end, I had to redesign slightly, because I couldn't find any way to interact with the table from within Presentation.
Instead, I just made the overall question user-editable, i.e. "Do you want to add pool members?"
Perhaps consider:
choice pool_add_members default "no" { "yes", "no" }
optional (pool_add_members == "yes") {
table pool_members {
...
}
}
The end-result is that the user makes a decision upfront about whether there are any pool members and, if there are, the table is shown. It's one extra step for the user, but it looks a bit nicer when there are deliberately no entries.
Your Implementation code can test the $1 entry as well, and not enter the table loop if it is "no", which might be a bonus.