I want to create a field that is automatically filled with the current page URL, and displayed as a link. The user should not be able to change that field. How can I do this?
If coding is required, please describe exactly what, and where to code.
Have a look at the Link module, it defines a link/url field. If you have the Token module, you might be able to use [site:current-page:url]
as a default value for the field.
The link module accepts tokens.
I used it many time to build url in some of my content type to pass on the value of the [node:id]
.
If you want to have the current url you have to use [current-page:url]
.
In the default value of the link module write this http://example.com/[current-page:url:path]
, and you will have the good result. I just test on my website (so don't forget to write your domain).
[]]1