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

Fetching dialog field value in JS

Avatar

Avatar
Ignite 1
Level 2
akshayb35452619
Level 2

Likes

5 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Ignite 1
Level 2
akshayb35452619
Level 2

Likes

5 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile
akshayb35452619
Level 2

13-08-2020

Hi All,

 

I have created custom component with dialog with one text field. I am trying to fetch text field value in js which gets called on clicking of validate button to validate the entered text field value by author. But I am unable to fetch dialog field value. 

I have tried these:

 

dialog.getField("property name").getValue();

properties.get("property name","");

 

But it is not working. Nothing observed in error logs.

 

Any help to resolve this will be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

389 likes

Total Posts

377 posts

Correct Reply

147 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

389 likes

Total Posts

377 posts

Correct Reply

147 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

14-08-2020

Check this https://stackoverflow.com/questions/45637228/to-fetch-dialog-property-value-selected-by-an-author-ae...

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-dialog-property-valu...

 

See sample snippets

$(document).on("selected", ".dropdownselect", function(e) {
    //iterate over e and get element select value
});

$(element).data("select").getValue();

 

Thanks!

 

 

Answers (2)

Answers (2)

Avatar

Avatar
Give Back 10
MVP
Varun_Shakya
MVP

Likes

124 likes

Total Posts

97 posts

Correct Reply

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

Avatar
Give Back 10
MVP
Varun_Shakya
MVP

Likes

124 likes

Total Posts

97 posts

Correct Reply

24 solutions
Top badges earned
Give Back 10
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
Varun_Shakya
MVP

14-08-2020

if you want to validate your textfield in touchUI dialog refer this:- https://aemfuel.blogspot.com/2018/06/validating-fields-in-touch-ui-dialog.html if textfield and validate button both present on page.. then textfield value can be picked up by class or id of that element on click function of validate button

Avatar

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

250 likes

Total Posts

262 posts

Correct Reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

250 likes

Total Posts

262 posts

Correct Reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile
Nikhil-Kumar
MVP

15-08-2020

Hey,

The best and awesome way that I found to get any dialog data in JS using in Jquery is using Coral UI.
Using this you can get any single field or multifield data.
It's really fast and smooth.
Checkout Jquery on dialog values to fetch the dialog values in JS using Jquery.

You can reach out to me as well, I have done a lots of customization on Coral UI.
Happy Coding!!