Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

CheckBox_Core_Component

Avatar

Avatar
Validate 1
Level 2
imadullakhan
Level 2

Likes

5 likes

Total Posts

51 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Establish
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
imadullakhan
Level 2

Likes

5 likes

Total Posts

51 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Establish
Give Back
Boost 5
Boost 3
View profile
imadullakhan
Level 2

16-02-2021

Hi @everyone

 

can anyone help me to do this core component"

when I select the checkbox, a new text field show is displayed. If the checkbox is unchecked, the text field should be hidden"
View Entire Topic

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

271 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

271 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Anudeep_Garnepudi
MVP

16-02-2021

@imadullakhan 

Create a custom listener file and add below code and update field names.

 

 

jQuery(document).on("dialog-ready", function() {
    $(document).on("change", "[name='./checkbox-name']", function(e) {
        if($(this).prop("checked")) {
            // Logic Checked
            $("input[name='./inputbox-name']").closest(".coral-Form-fieldwrapper").show();
        } else {
            // Logic un checked
            $("input[name='./inputbox-name']").closest(".coral-Form-fieldwrapper").hide();
        }
    });
});

 

Check out below post for more details.

https://adapttoaem.blogspot.com/2021/02/aem-hideshow-touch-ui-dialog-fields.html