Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Listed below is a sample from the original StoreFront theme.   Your theme may style the markup differently, but the process will remain the same:  

  1. if there are any errors, then
  2. iterate through the errors array
  3. display them appropriately depending on whether the error has already been html escaped or not

 

Code Block
languagexml
themeDJango
linenumberstrue
## these two comments at the top aid code editors to provide syntax check and intellisense.
## they're not required, but leaving them might help if UltraCart support becomes involved.
#* @vtlvariable name="i18n" type="com.bpsinfo.storefront.tobjects.I18nWriter" *#
#* @vtlvariable name="formSupport" type="com.bpsinfo.storefront.tobjects.FormSupport" *#
 
## $formSupport is a top level variable accessible by all system screens (non-catalog)
#if($formSupport.errors && $formSupport.errors.size() > 0)
	<div class="row">
		<div class="columns small-full">
			<div class="alert error text-left no-margin-top no-margin-bottom">
				#foreach($error in $formSupport.errors)
					#if($error.alreadyEscaped)$!error.message#{else}$i18n.escape($error.message)#{end}<br>
				#end
			</div>
		</div>
	</div>
#end ##if-errors.size() > 0