내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

How to click on button in Adobe AEM form using javascript

Avatar

Level 1

I am new to AEM and wanted to test the form using javascript. In my AEM form there is button which clears all the fields value.

I need to click on that button using javascript.

I am not able to find any function for click or press in given document.

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsapiref.pdf

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

@arvind12 Unfortunately not! Since, JS is served from the clienlib, you cannot inject it at runtime. However, you can use your favourite IDE to integrate it to AEM clientlib. 


Santosh Sai

AEM BlogsLinkedIn


원본 게시물의 솔루션 보기

4 답변 개

Avatar

Level 7

Hi @arvind12 Assuming, you are using Custom/OOTB form component, JQuery/Java script code should be part of clientlib. 

Avatar

Community Advisor

Hi @arvind12 ,

In AEM - JS,CSS, etc. keeps under one folder that's called clientlib. To render your script based on some event you should have your JavaScript implemented in clientlib. For how to create clientlib please go through these below links.

  1. http://www.sgaemsolutions.com/2017/06/clientlibs-in-aem-63-part1.html
  2. http://www.sgaemsolutions.com/2017/06/clientlibs-in-aem63-part2_25.html

You can also visit this article to include JavaScript in different ways: https://sourcedcode.com/blog/aem/how-to-include-javascript-for-an-aem-website

Hope that helps!

Regards,

Santosh


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 1

Is there something which I can try/run with JavaScript Console within Adobe?

arvind12_0-1656356440063.png

 

Avatar

정확한 답변 작성자:
Community Advisor

@arvind12 Unfortunately not! Since, JS is served from the clienlib, you cannot inject it at runtime. However, you can use your favourite IDE to integrate it to AEM clientlib. 


Santosh Sai

AEM BlogsLinkedIn