Expand my Community achievements bar.

SOLVED

Default value to the text field in AEM 6.4

Avatar

Level 2

Is there any way to add default value to the text field in AEM 6.4

1 Accepted Solution

Avatar

Correct answer by
Employee

Is the text field in Metadata Properties of an Asset?

 

If yes, then the below community post may be helpful:

https://experienceleaguecommunities.adobe.com/t5/Adobe-Experience-Manager/How-to-set-default-values-...

View solution in original post

6 Replies

Avatar

Community Advisor

Yes, You can use value property to add default value in text fields.

https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/granite-ui...

 

Another way is to create cq:template node and add a default value.

http://www.sgaemsolutions.com/2018/02/cqtemplate-and-cqtemplatepath.html

 



Arun Patidar

Avatar

Community Advisor
It will only works if you are using Coral3 type and when you add components first time. For existing pages or added components it will not work.


Arun Patidar

Avatar

Level 1

@arunpatidar  - I believe this works only for the new component. When i add the new field to existing component dialog, it does not save the default value using the value attribute automatically. The user needs to open the dialog, it takes populates the field from value property and save the dialog to save the field with this value in JCR.

I have a requirement where I need to save default values for new fields added to dialog without needing to open the dialog. Kindly advise how this can be done without involving any backend logic. Thanks!

Avatar

Correct answer by
Employee

Is the text field in Metadata Properties of an Asset?

 

If yes, then the below community post may be helpful:

https://experienceleaguecommunities.adobe.com/t5/Adobe-Experience-Manager/How-to-set-default-values-...

Avatar

Level 2
ThanksIts not for the asset, its a field for page properties @sunjot16