Skip to content

Commit

Permalink
DropdownList Comma removed
Browse files Browse the repository at this point in the history
  • Loading branch information
YarakarajuR committed Jun 2, 2017
1 parent 0befd59 commit d02de76
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Epi.DynamicForms.Core/DynamicFormModelBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ public object BindModel(ControllerContext controllerContext, ModelBindingContext

if (dynField != default(InputField))
{
if (dynField is TextField)

if (dynField is AutoComplete)
{
var txtField = (AutoComplete)dynField;
txtField.Response = postedForm[key].TrimEnd(',');
}

else if (dynField is TextField)
{
var txtField = (TextField)dynField;
txtField.Value = postedForm[key];
Expand Down Expand Up @@ -83,11 +90,11 @@ public object BindModel(ControllerContext controllerContext, ModelBindingContext
chkField.Checked = test;
}
}
else if (dynField is AutoComplete)
{
var AutoCompleteField = (AutoComplete)dynField;
AutoCompleteField.Value = postedForm[key];
}
else if (dynField is AutoComplete)
{
var AutoCompleteField = (AutoComplete)dynField;
AutoCompleteField.Value = postedForm[key];
}
}
}
catch (System.InvalidOperationException ex)
Expand Down

0 comments on commit d02de76

Please sign in to comment.