I have a Form which contains a hidden field. I want to set a property to it's default value as, the Current page's (where the form is) dynamically generated property.
@{
var umbNode = new umbraco.presentation.nodeFactory.Node(Convert.ToInt32(Umbraco.Field("selectOrganization").ToString()));
string propValue = umbNode.GetProperty("orgName").Value;
}
I am able to set a value which is in the Document type properties (using [#alias] syntax)
but I can't set the "propValue" to the hidden field default value..
Are you able to get the value in string type variable propValue and want to set this value in hidden field right ? or something else, please clear this.
Bracket syntax for dynamic property
Hi,
I have a Form which contains a hidden field. I want to set a property to it's default value as, the Current page's (where the form is) dynamically generated property.
I am able to set a value which is in the Document type properties (using [#alias] syntax)
but I can't set the "propValue" to the hidden field default value..
appriciate your help on this..
thanks
Hi Kausan
Are you able to get the value in string type variable propValue and want to set this value in hidden field right ? or something else, please clear this.
Thanks
Hi Manish,
Yds..I can get the value to the variable..just want to set it to the hidden field...
Thanks
Hi
is this not working for you
Manish
Hi Manish
I cant use it because its a Umbraco Form and its rendering as a macro.. thats why I m tring to use the Form's hidden field and bracket syntax
Kasun
Hi
use this one
Hi Manish
Ill try and let you know
Thanks Kasun
is working on a reply...