-
Notifications
You must be signed in to change notification settings - Fork 0
Description
A brief description of the issue goes here.
Use of [@Remote_Addr] yields no result
Reproduction
If you're filing a bug, please describe how to reproduce it. Include as much
relevant information as possible, such as:
Bug summary
Use of [@Remote_Addr] yields no result
Specifics
Using "[@Remote_Addr]" as the "Default Setting" for a Hidden Field answer type doesn't appear to work. i.e. the field in the web page source remains as an empty string.
Steps to reproduce
Umb 9.1.2 site with UmbracoForms 9.2.0-rc001 installed and hosted on Windows. Create a form, add a hidden field, and set it's default value to "[@Remote_Addr]" as shown:-
Add the form to a view.
Upload to a Windows server ensuring the site is running "in process" on IIS.
Look at the source of the view.
Expected result
<input type="hidden" name="7f2bea21-54b1-44e9-e9fe-0292315566c9" id="7f2bea21-54b1-44e9-e9fe-0292315566c9" data-umb="7f2bea21-54b1-44e9-e9fe-0292315566c9" class="hidden" value="123.123.123.123"/>
Actual result
<input type="hidden" name="7f2bea21-54b1-44e9-e9fe-0292315566c9" id="7f2bea21-54b1-44e9-e9fe-0292315566c9" data-umb="7f2bea21-54b1-44e9-e9fe-0292315566c9" class="hidden" value=""/>
It should be noted that the actual page in question correctly shows the IP Address as text using @HttpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString().
https://our.umbraco.com/forum/umbraco-9//107815-remote_addr-magic-string-not-working refers.