Developer forum

Forum » Templates » action url returned by @GetValue("UserManagement:User.FormStart") template tag

action url returned by @GetValue("UserManagement:User.FormStart") template tag

Søren Bremholm Jakobsen
Reply

Hi,

I have an issue at a change password page. We are using the @GetValue("UserManagement:User.FormStart") template tag. The tag returns a form with an action url (see below). The problem is that the site is https but the tag returns a http url and users are therefore not able to change password. Anyone knows where action url are stored or retrieved from?

<form name="UserManagementEditForm" action="http://b2bprod.vikingfootwear.com/Default.aspx?ID=438&amp;ObjectID=1237&amp;Action=Edit&amp;ChangePass=True" method="post" enctype="multipart/form-data">

The site is running on DW version 8.9.2.21

Also when going from the userdetails page to edit profile page the site changes from https to http.


Replies

 
Nicolai Pedersen
Reply

Hi Søren

This works differently on 9.4 where this is handled together with other issues.

For this installation use a quickfix like this:

@GetValue("UserManagement:User.FormStart").Replace("http:", HttpContext.Current.Request.Url.Scheme + ":")

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Søren,
in order to fix the problem with "action" url you need to fix your second problem: " when going from the userdetails page to edit profile page the site changes from https to http".
You need to edit your template for the "View profile" mode "Template" dropdown - here you can edit your template and check the tag:
<a href="<!--@UserManagement:User.EditUrl-->">Edit your profile</a>
You need to change the href="<!--@UserManagement:User.EditUrl-->" to href="https://yoursitename.com<!--@UserManagement:User.EditUrl-->"
Regards, Dmitrij

 
Søren Bremholm Jakobsen
Reply

Thanks both for guiding me. I ended up doing JavaScript to change the Url on the form

string EditUrl = GetString("UserManagement:User.EditUrl");

string EditPassUrlJs = string.Format("https://b2bprod.vikingfootwear.com/{0}&ChangePass=True", EditUrl);

<script>

$(document).ready(function () {

$('form').attr('action', '@EditPassUrlJs')

});

 

</script>

 

You must be logged in to post in the forum