简体   繁体   English

获取在 wp 联系表 7 中提交表单的用户名?

[英]Get username that submitted a form in wp contact form 7?

how can I get the username that submitted a form created with contact form 7?如何获取提交使用联系表 7 创建的表单的用户名? I know there I can set it as default and hide it, but then users can change it and submit it of course (I need it to be uneditable).我知道我可以将其设置为默认值并隐藏它,但是用户当然可以更改它并提交它(我需要它是不可编辑的)。

So is there any way I can get in Flamingo plugin the username of the person who submitted the form?那么有什么方法可以让我在 Flamingo 插件中获取提交表单的人的用户名? Or any suggestion?或者有什么建议?

I created the form with the plugin editor, so I create the fields like this:我用插件编辑器创建了表单,所以我创建了这样的字段:

<p> Username
    [text* your-name default:user_login] </p>

<label> Email
    [email* your-email] </label>

<label> Passaport
    [text* your-subject] </label>

And then I use the shortcode to insert the form:然后我使用简码插入表格:

[contact-form-7 id="127" title="Formulario de contacto 1"]

But by getting the username by this mean, it can be of course edited by the user.但是通过这种方式获取用户名,当然可以由用户进行编辑。

You can hide it using jQuery and the user will not be able to change it您可以使用 jQuery 隐藏它,用户将无法更改它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM