Fixes #7120 Hidden Field in Dynamic Forms causes crash (#7123)

Fixes #7120 - If a Hidden Field is added to a DynamicForm without a Value set then it will crash the front end because of a null value.
This commit is contained in:
Matthew Harris
2016-09-29 20:48:22 +01:00
committed by Sébastien Ros
parent ec0a0998da
commit a46b86b243

View File

@@ -36,7 +36,7 @@ namespace Orchard.DynamicForms.Drivers {
protected override void OnDisplaying(HiddenField element, ElementDisplayingContext context) {
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
context.ElementShape.ProcessedValue = element.RuntimeValue;
context.ElementShape.ProcessedValue = element.RuntimeValue ?? string.Empty;
}
}
}
}