Developer forum

Forum » CMS - Standard features » Razor has no Field.Error

Razor has no Field.Error

Nuno Aguiar
Reply

Hi,

 

Using the Extranet module in "Login" mode, within the UserManagement:User.Login.Fields loop, the Error tag is never rendered. The html version works perfectly.

 

We tried using TemplateTags, but really looks like a DW bug. Can anyone take a look?

          @foreach(LoopItem f in GetLoop("UserManagement:User.Login.Fields")){
            <fieldset>
              <label for='@f.GetString("Field.Name")'>@f.GetString("Field.Title"): </label>
              @f.GetString("Field.Input")
            </fieldset>
            if(f.GetString("Field.Error") != ""){
              <p class="error" for="@f.GetString("Field.Name")">@f.GetString("Field.Error")</p>
            }
            @f.TemplateTags()
          }

 

Best Regards,

Nuno Aguiar


Replies

 
Vladimir
Reply

Hi Nuno,

all should be fine: just correct your template condition @if(f.GetString("Field.Error") != ""){

Best regards,

Vladimir

 

You must be logged in to post in the forum