Am generating a hidden fields like so:

我生成一个隐藏的字段,如下所示:

@helper.input(_form("userID"), '_label-> None) { (id, name, value, args) =>
  <input type="hidden" name="@name" id="@id" value="@value" @toHtmlArgs(args)>
}

Which works fine except for the fact that the div wrapper block element is created, which creates visual empty space in the form, not looking good -- how to make hidden input elements display without div wrapper?

哪个工作正常,除了创建div包装器块元素的事实,它在窗体中创建视觉空白空间,看起来不太好 - 如何使隐藏的输入元素显示而不使用div包装器?

I know I can jQuery hide the parent div wrapper, but I'd like to not generate it in the first place.

我知道我可以jQuery隐藏父div包装器,但我想首先不生成它。

4 个解决方案

#1


14

You don't need to use a @helper.input in this case. Try this:

在这种情况下,您不需要使用@helper.input。尝试这个:

@defining(_form("userID")) { uidField =>
  <input type="hidden" name="@uidField.name" id="@uidField.id" value="@uidField.value">
}

更多相关文章

  1. Selenium InternetExplorerDriver无法找到明显的元素。
  2. java中循环遍历删除List和Set集合中元素的方法
  3. 使用SAX Filter将新元素插入XML文件
  4. java入门---数据结构操作实例之获取链表的元素
  5. Java的Web项目中Web.xml配置文件元素详解
  6. Java XML - 具有相同名称的嵌套元素

随机推荐

  1. php的设计模式是什么意思
  2. API 交互中怎么做好图片验证码
  3. php字符串函数有哪些
  4. php基础算法有哪几种
  5. PHP中的无限级分类、无限嵌套评论
  6. PHP中的相关服务容器与依赖注入的相关解
  7. 用PHP实现高并发服务器
  8. Tideways、xhprof 和 xhgui 打造 PHP 非
  9. 【笔试题】用PHP写一个微波炉
  10. 使用file_get_contents()函数读取文件内