My extension places a field on a page that loads data via AJAX from the database. The field appears blank until the data is loaded. How can I show the CiviCRM spinning logo if my data isn't loaded yet?


You can add the class "crm-loading-element" to the element, and then in your ajax success handler remove the class.

If you want the actual CiviCRM logo, you can add both the classes "blockUI blockOverlay" instead, but depending on the field size it may look off. The other one seems to fit better.

If you want the screen to gray out the way some of the popups do, you can do:


where div.something is just some larger div surrounding your form, but somewhere within div#crm-container, then your ajax success handler remove it with:


Your Answer

