Expand my Community achievements bar.

SOLVED

How can i create a title or heading in a dialog.

Avatar

Level 2

Hi Everyone,

 

I am trying to create a dialog where I need a check box with a heading, which looks something like below image. 
The problem here is if I use heading as a resource type, field description is not appearing in that case.
Can anyone please help me with what resource type should I use here for "Visibility in Search bar" title, so that I get to use the field Description as well.

Shreya97_2-1663665748526.png

 

Any help will be appreciated. Thanks.

@arunpatidar @Sachin_Arora_ @Jörg_Hoh @Mohit_KBansal @ksh_ingole7@lukasz-m

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I think you might be looking for fieldset. If you just want to warp the checkbox and other field within container then use fieldset as container.

e.g.

arunpatidar_0-1663671270889.png

 

Although none of the container provide descriptions , you can use headline as description along with fieldset title. This description would not be as tooltip but as a text, will serve the purpose tho.



Arun Patidar

View solution in original post

4 Replies

Avatar

Community Advisor

Hi,

You can use heading resource type

https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/... 

 

/libs/granite/ui/components/coral/foundation/heading
A heading component to represent HTML h1 - h6.


Arun Patidar

Avatar

Correct answer by
Community Advisor

I think you might be looking for fieldset. If you just want to warp the checkbox and other field within container then use fieldset as container.

e.g.

arunpatidar_0-1663671270889.png

 

Although none of the container provide descriptions , you can use headline as description along with fieldset title. This description would not be as tooltip but as a text, will serve the purpose tho.



Arun Patidar

Avatar

Level 2

Hi I am currently using heading but i want a field description along with that which I m not getting in case of heading.

Avatar

Level 5

As mentioned here 

https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/... 

 

heading resource supports just level and text

poojac35931336_0-1663668394623.png

Only form fields that extend https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/...  have support for field description.

 

If you want such behavior with heading resource you might need to write your own custom code for the same.