KnockoutJS and Umnraco @Html.EditorFor(m => profileModel.MemberProperties[i].Value) field
Hi Guys,
In my profile editor I have a field, like this one:
@Html.EditorFor(m => pModel.MemberProperties[i].Value)
That is basically a field that is beying generated within foreach loop. This example cam be found amond default Umbraco partials.
Question:
I want to add a knockoutJS "data-bind" attribute. And my goal is to be able to use something like this:
@Html.EditorFor(m => pModel.MemberProperties[i].Value, new { data-bind = "value: ko_field" })
But that does not really work. Obviously that in this case Umbraco Razor thinks that "data" wants to minus "field" variable or something like that, but "data_bind" does not work either.
Q2) How about custom attributes for this @Html.Editor objects?
KnockoutJS and Umnraco @Html.EditorFor(m => profileModel.MemberProperties[i].Value) field
Hi Guys, In my profile editor I have a field, like this one: @Html.EditorFor(m => pModel.MemberProperties[i].Value)
That is basically a field that is beying generated within foreach loop. This example cam be found amond default Umbraco partials.
Question: I want to add a knockoutJS "data-bind" attribute. And my goal is to be able to use something like this:
But that does not really work. Obviously that in this case Umbraco Razor thinks that "data" wants to minus "field" variable or something like that, but "data_bind" does not work either.
Q2) How about custom attributes for this @Html.Editor objects?
Thanks for help! :)
/Dmitrij
For example, found this nice article here: http://justthisguy.co.uk/umbraco-knockoutjs-forms-pt1/
And attempted to do something like this:
That should work, but to my surprise, it just don't. Any idea what am I doing wrong?
/Dmitrij
is working on a reply...