Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. if (request.Fields != null)
  2. {
  3. var formAttributesModel = request.Fields
  4. .Where(x => !string.IsNullOrEmpty(x.FormAttribute.AutoEvaluatedValue) ||
  5. !string.IsNullOrEmpty(x.FormAttribute.RequiredCondition) ||
  6. !string.IsNullOrEmpty(x.FormAttribute.VisibilityCondition) ||
  7. !string.IsNullOrEmpty(x.FormAttribute.EditabilityCondition))
  8. .Select(y => y.FormAttribute)
  9. .ToList();
  10.  
  11. foreach (var fieldModel in request.Fields)
  12. {
  13. _formViewService.SetTriggers(fieldModel, formAttributesModel);
  14.  
  15. if (fieldModel.PlaceholderId != placeholderId)
  16. {
  17. fieldPosition = 0;
  18. placeholderId = fieldModel.PlaceholderId;
  19. }
  20.  
  21. var configuration = await _formService.AddConfiguration(fieldModel);
  22. await _formService.AddNewField(fieldModel, form, formView, fieldPosition++, configuration, null);
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement