This document will walk you through how you can update the pop up messaging that appears when you attempt to deploy a notification but a specific requirement has not been met.

Enter the editor for the form you wish to update, and navigate towards the notification.

There are only a few steps in order to update the notification popup. Begin by clicking on “Send Notification”.

Within the Options Table Accordion, select the text in the onlick attribute cell and copy it.

Open a text editor / coding environment and paste the previously copied text into it (ex: https://jsfiddle.net/).

Take note of the ID on the field which you wish to use as the condition for the notification. If the desired field is the school field, you would navigate to the school drop down (likely found on the first tab), and note the ID. (in this case it is schoolName)

Return to your code/text editor and create the conditional statement. In order to reference the desired field, you will need to use the id noted in the previous step. In the following example you would use it in place of “SCHOOLID” (keeping the “#” symbol).

Ex: If there is a value in the school field, send the notification. Else have a popup informing the user a school must be selected.

Making the Popup

In order to create the popup, clever utilizes the “ player.callDialogMessage()” function. This function will easily let you set the title and text of the popup. This will be called under the else condition of the previously constructed conditional statement.

Clevr will usually set the title to “clevr Notification” and the text to something along the lines of “Please make sure a school has been selected and try again.”

Putting it all Together

Now that you have the notification, the conditional statement, and the pop up, you just have to put it all together.

Add the previously copied text from the notifications “onclick” attribute to the statement where it says “/*Send the Notification Here*/”.

Next add the popup where it says “/*Send the popup here*/”.

It may be similar to the following:

if ($("#schoolName").val()) { 
NotificationButtonSpecificLoc({initiativeId}, 'IEP Form Notification', '6300080000160000081', 'SubmitToPrincipal'); 
$.setToTodayDate('63700000000000787');
} else {
  player.callDialogMessage("Error", "Clevr Notification", "Please make sure a school has been selected and try again.", true, true)
}

Finally, copy the whole statement and navigate back to the notification on the form.

Paste the conditional statement into the “onclick” attribute where you originally copied the notification and press enter. Publish the form and verify that it works.

  • This document will walk you through how you can use the clevr Form Editor to configure show/hide...

    Continue reading
  • This document will address how to restrict date pickers, how to specify the length between them in terms of days, how to prevent users from picking dates which aren’t congruent with the specified length, and how to throw errors/a warning to the user...

    Continue reading
  • This function uses one or more field values to create a custom description for a record...

    Continue reading