Developer forum

Forum » CMS - Standard features » Forms for Editors and session-variables

Forms for Editors and session-variables

Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi,

Is it possible to set the standard value for a hidden field, to be a session variable?

--
Best regards
Kurt Moskjaer Andersen


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Kurt.

That is not possible. You can in a Razor template do something like this:

<script>

document.getElementById("hiddenfieldName").value = '@HttpContext.Current.Session.Item["Somevariable"]';

</script>

Votes for this answer: 1
 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Nikolai,

Okay, I will have to do that then.
Thanks :)

/Kurt

 

You must be logged in to post in the forum