实际提交的Rails占位符 [英] Placeholder in Rails that will actually submit
本文介绍了实际提交的Rails占位符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道如何使用一个轨道形式的占位符,但是有没有办法把一些东西放在实际提交的东西?像<%= f.email_field,:email,(元素在这里):<%= current_user.email%> %>
帮助将不胜感激。如果您有任何问题,请告知我。
I know how to make a placeholder in a rails form, but is there a way to put something in it that will actually submit something? Something like <%= f.email_field, :email, (element here): <%= current_user.email %> %>
Help would be much appreciated. Let me know if you have any questions.
推荐答案
只需添加一个值即可。以下示例
Just adding a value it should work as you want. Example below
<%= f.email_field, :email, value: current_user.email %>
这篇关于实际提交的Rails占位符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文