hi
i use Custom View tag in code part
who can i get currect fild name
@{
var return = CurrentPage.{{{name}}}.CurrentValue;
}
@return
it's return x_CustomerName but this fild name is only CustomerName
hi
i use Custom View tag in code part
who can i get currect fild name
@{
var return = CurrentPage.{{{name}}}.CurrentValue;
}
@return
it's return x_CustomerName but this fild name is only CustomerName
{{{name}}} stands for the id or name attribute of the HTML element of the field, which is "x_<fieldname>". To output the field value only just use {{{value}}}. There is no tag for outputting the field name. Read "Field Setup" -> "Custom Edit Tag" in the help file for details.
As explained in the help file, {{{value}}} is "the CurrentValue of the field object. It will converted to @<page>.<field>.CurrentValue. Note that it includes the @ tags, use it in HTML only, do not use it in C# code". So you code (in C#) will NOT work.
Since it is a Custom Edit Tag, your custom tag should provide a HTML form input element (which name should be {{{name}}}) in HTML so you field value can be submitted and saved.
Read "Field Setup" -> "Custom Edit Tag" in the help file carefully, read the examples, try to understand how it works first.