You need to sign in to do that
Don't have an account?

Alert message in Lightning
Hi there!
I'm new to Lightening so was having a lil trouble if someone can plz help me out here,
In my Custom Lightning Page I want to show a pop-up message saying "Do you Really want to save this Form" followed by option 'Yes' and 'No'. Clicking on which will do their respective action.
Do I need to build a component??
I'm new to Lightening so was having a lil trouble if someone can plz help me out here,
In my Custom Lightning Page I want to show a pop-up message saying "Do you Really want to save this Form" followed by option 'Yes' and 'No'. Clicking on which will do their respective action.
Do I need to build a component??
There are notification components documented.
You can roll your own JavaScript here as per specification
You can use one of the alerts,toasts or prompt depending on your need.
Please note all code has to be custom .
Please mark this as solved if it's resolved.
Best Regards,
Nagendra.P
I havnt run the below code but it should work)
In your lightning code add: In the controller add:
Thanks
Mann
Please mark as answer if you feel it is :)
You can use Java script for confirmation pop and also you
can validate your data according to popup action on your java script controller.
On lightning:
<lightning:button class="slds-align_absolute-right" variant="brand"
label="Generate PDF" onclick="{!c.clickEvent}"/>
On Java script controller:
clickEvent: function (component, event, helper) {
if (confirm('Do You Really want to save!!') == true) {
// write your code here which you want to execute on yes.
return true;
}
else {
return false;
}
}
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi