expressionegine 矩阵插件检查字段是否为空
我有一个包含几列的矩阵字段。当用户提交表单时,我只想显示用户输入的列字段。
如何检查矩阵字段是否为空?
只是为了澄清我正在谈论表达式引擎的矩阵扩展。
例如,这对我不起作用,因为该行可以提交为空:
{if "{exercise_set1:total_rows}" >= 1}
{exercise_set1:table cellspacing="0" cellpadding="0" class="format_head"}
{/if}
I have a matrix field with several columns. When user submits the form I want to display only column fields user entered.
How can I check if matrix field is empty?
Just to clarify I'm talking about expressionengine's Matrix extension.
For example this wont work for me since the row can be submitted empty:
{if "{exercise_set1:total_rows}" >= 1}
{exercise_set1:table cellspacing="0" cellpadding="0" class="format_head"}
{/if}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要检查是否有任何行填充,
我遇到了一个问题,用户可以将文件附加到条目,但是当没有附加文件时,不会生成图库
To check if there are any rows filled use
I had the problem that users could attachs files to an entry but when no files were attached do not generate the Gallery
您只是想检查是否设置了任何内容?
You just want to check to see if anything is set?