开发者

WordPress: Disable add custom field

开发者 https://www.devze.com 2023-01-30 13:04 出处:网络
I allow a guest to post on my WordPress site. I disabled some fields, but I let the user select only one field.

I allow a guest to post on my WordPress site. I disabled some fields, but I let the user select only one field.

Cool, but he can edit this field. Example: Field: name. After I a开发者_如何学编程dded it, he can rename the field to name2.

So, how do I can a disable this?


Use the readonly attribute,

<input type="text" name="test" value="<?php echo $name ?>" readonly="readonly">
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号