Expand my Community achievements bar.

SOLVED

Has anyone got a chance to extend an AEM Forms Component? for eg. File Attachment Component

Avatar

Level 4

AEM v. 6.5.8

I tried using resourceSuperType like we do for normal AEM component but it just breaks the form.

sling:resourceSuperType="fd/af/components/guidefileupload"

Getting the following error on console:

guideRuntime.min.js:1082 TypeError: Cannot read properties of undefined (reading 'priority')
at getAttribute (VM1484 guideRuntime.min.js:624:448)
at get (VM1484 guideRuntime.min.js:645:118)
at g._collectExpressions (VM1484 guideRuntime.min.js:632:279)
at g.initialize (VM1484 guideRuntime.min.js:631:359)
at g.initialize (VM1484 guideRuntime.min.js:869:153)
at g.c.ut.Class (VM1484 guideRuntime.min.js:14:187)
at g [as constructor] (VM1484 guideRuntime.min.js:13:120)
at g [as constructor] (VM1484 guideRuntime.min.js:13:120)
at g [as constructor] (VM1484 guideRuntime.min.js:13:120)
at new g (VM1484 guideRuntime.min.js:13:120)
e.model.fireOnContainerDomElementReady @ guideRuntime.min.js:1082
window.guidelib.__runtime__.target.loadExperience @ test2.html?wcmmode=preview:941
(anonymous) @ test2.html?wcmmode=preview:949
guideRuntime.min.js:1076 Uncaught TypeError: Cannot read properties of undefined (reading 'runtime')
at Object.e.model.mergeData (VM1484 guideRuntime.min.js:1076:164)
at Object.e.model.fireOnContainerDomElementReady (VM1484 guideRuntime.min.js:1082:493)
at Object.window.guidelib.__runtime__.target.loadExperience (test2.html?wcmmode=preview:941:39)
at test2.html?wcmmode=preview:949:48

1 Accepted Solution

Avatar

Correct answer by
Employee

You could customize the File attachment component as other AF components using the widget framework. as explained in the link below:

https://experienceleague.adobe.com/docs/experience-manager-64/forms/customize-aem-forms/custom-appea...

 

Thanks,

Mayank

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

You could customize the File attachment component as other AF components using the widget framework. as explained in the link below:

https://experienceleague.adobe.com/docs/experience-manager-64/forms/customize-aem-forms/custom-appea...

 

Thanks,

Mayank

Avatar

Level 4

The reason why I want to extend the component was to add some default support types to the file attachment component. So that whenever I use file attachment component It should already include all the mime types which I require. is this possible in the above? because what i got from the link was to chnage the appearance of the component is possible.

Avatar

Level 4

This will work If I want to restrict the uploads.
Again sorry for not sharing this earlier, What I'm trying to achieve is that when user clicks on attach button a file explorer should open and by default some file types should be visible.
So, I'm not adding the file types just to verify the uploads but the main agenda is to have those files already visible on the explorer window when attach button is clicked.