In Salesforce, a message prompt normally requires 80 lines of code that looks like the following:

Typically, you would need to provide this for every prompt you use. However, you can use Fonteva’s component that only requires a few lines.

All of the attributes available in Salesforce’s component are still available in Fonteva’s component. You can designate which buttons show and what they do. By default, the Cancel and Submit buttons are enabled. All fields can be modified on the fly.

  • titlethe title of the message displayed. This can be HTML
  • message – the body of the message displayed. This can be HTML.
  • severity – error, warning, etc. MORE
  • showCancelButton – set to "True" to show the cancel button on your message prompt
  • cancelButtonLabel – Can use HTML here.
  • showSubmitButton – Set to "True" to display the Submit button on your message prompt
  • submitButtonLabel – Can use HTML here.
  • enableSubmitButtonProgressIndicator – Enabled by default.
  • preFormatText – allows you to send in HTML. This HTML is automatically rendered.
  • submitOnClickAction – By default, this just hides the modal. You can provide your own custom aura action.
  • closeOnClickAction – By default, this just hides the modal. You can provide your own custom aura action.

To instantiate this component, use the following example:

<Framework:MessagePrompt title="{!$Label.c.No_Available_Sessions}"
                            message="{!$Label.c.No_Available_Sessions_Description}"
                            severity="warning"
                            aura:id="noSessionPrompt"
                            showCancelButton="false"
                            closeOnClickAction="{!c.showManageReg}"
                            submitButtonLabel="{!$Label.c.No_Available_Sessions_Submit}"
                            submitOnClickAction="{!c.showManageReg}"/>
XML