Episerver Forms - Custom form element block icons!

Vote:
 

Hello,

I'm looking to try to customise the episerver form element icons! (see below)

As you might notice, I've already replaced three of them. This is because they have their own custom Model.cs file (so it was no diffrent from any other non forms block - update SiteImageUrl in the model)

However, the rest (in blue) do not have their own custom model file!

I'm thinknig that this is achieveable in the same way as customising the form element views (by putting them in a particular file structure in the solution). EG (for views) Views / Shared / ElementBlocks / custom.ascx files

I cannot find any documentation for this though and so, I'm having real trouble with it!

As an exmaple the Text elements icon src default is /EPiServer/EPiServer.Forms.UI/4.24.2//ClientResources/epi-forms/themes/sleek/images/contenttypes/textboxelementblock.png

Has anyone done similar in the past or have some steer for me?


#236657
Edited, Dec 08, 2020 12:45
Vote:
 

A quick and dirty solution would be adding rewrite rules for those existing icons, sending the request to your own icons instead.
Just add the rewrite rules to your web.config.

https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

#236681
Dec 09, 2020 5:58
Vote:
 

Thanks for the suggestion, Tomas.

I finally got around to trying this today and it worked!

Cheers!

#245970
Dec 23, 2020 8:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.