Lava Shortcode - Currency
Description
Add a currency input field with automatic number formatting.
Documentation
This control displays a currency input.
Example Usage
{[ currency label:'Currency' value:'100.00' isrequired:'true' ]}
Parameter List
This control supports the following parameters:
- label (Currency) - The label to display above the control.
- showlabel (true) - Whether to display the label.
- value - The value to initially set the control to.
- isrequired (false) - Establishes whether making a selection is necessary.
- validationmessage (Please specify an amount.) - Message to display when the value is not valid.
- additionalattributes - Additional attributes to include on the input control.
Markup
{% assign isrequired = isrequired | AsBoolean %}
{[ rockcontrol id:'rc-{{ '' | UniqueIdentifier }}' showlabel:'{{ showlabel }}' label:'{{ label }}' controltype:'currency-box' isrequired:'{{ isrequired }}' validationmessage:'{{ validationmessage }}' ]}
<div class="control-wrapper">
<div class="input-group ">
<span class="input-group-addon">{{ 'Global' | Attribute:'CurrencySymbol' }}</span>
<input type="number" class="form-control" inputmode="decimal" step="0.01" value="{{ value }}" {% if isrequired == true %}required{% endif %} {{ additionalattributes }}>
</div>
</div>
{[ endrockcontrol ]}