Foundation icon indicating copy to clipboard operation
Foundation copied to clipboard

Custom form elements views are not applied

Open SHIFT969 opened this issue 3 years ago • 1 comments

Describe the bug Form elements view location "/Features/Shared/Views/ElementBlocks/{0}.cshtml" defined in FeatureViewLocationExpander is not being used.

To Reproduce

  1. Go to "Features\Shared\Views\ElementBlocks\TextboxElementBlock.cshtml"
  2. Add breakpoint anywhere or "TEST" text in <label> tag.
  3. Build and run the website.
  4. Create new with TextboxElementBlock and place it anywhere.
  5. Go to the page with the new form.
  6. Fom is rendered but custom view is not used. (no breakpoint hit, no sample text)

Expected behavior Views from location "/Features/Shared/Views/ElementBlocks/{0}.cshtml" defined in FeatureViewLocationExpander should be used.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: chrome
  • Versions: CMS 12.7.0; Forms 5.1.0

Additional context Editing forms.config doesn't seem to work either. I assume it's episerver error.

SHIFT969 avatar Jun 22 '22 09:06 SHIFT969

This should be fixed via this change: https://github.com/episerver/Foundation/commit/c22324f2044ce2880c53c4323f04cdf1bc540e7f

Working as expected for me now:

image

@SHIFT969 - can you confirm it's now functioning correctly for you as well, and this can be closed?

daniel-isaacs avatar Jun 27 '22 20:06 daniel-isaacs