This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

flash_message function

Defined in /modules/cms/init/custom_helpers.php, lines 95-114
Author LemonStand eCommerce Inc.
string function flash_message()
{return} string returns the flash message HTML markup or empty string.
Returns a message previously set by a page action. Flash messages are designed for passing messages from action to pages (partials and layouts), for example for displaying form validation errors. If you use standard POST method (not AJAX) for your forms, you need to place flash_message() function above the form to display error messages generated by a page action. If flash message is not empty, it is wrapped into a paragraph element with the class attribute value "flash" + message type, for example <p class="flash error">. Possible values for the message types are error and success. If the flash message is empty, the function returns an empty string.
If the flash_partial variable is presented in the POST array, the function renders a partial instead of returning the message string. Please read the LemonStand front-end JavaScript framework article to learn about the flash_partial feature.
The following code outputs the form tag and a flash message.
<?= open_form() ?>
<?= flash_message() ?>
...