Description
Setting isrequired to false in the lava textbox shortcode does not work.
Actual Behavior
The input always has "required" on it, whether or not false is set.
Expected Behavior
The input required attribute should change depending on what is set on the shortcode.
Steps to Reproduce
- Add a textbox shortcode to an HTML content block, setting the value to anything, but setting isrequired to false as shown below
{[ textbox name:'test' label:'Test' value:'test' isrequired:'false' ]}
- Use the browser dev tools to inspect the input element and notice the required attribute still set.

This will cause fields that should not be required to be required on forms.

In my testing, I was able to make a functional version of the Text Box by moving the assign for isrequired inside of the rock control shortcode body, such as this:
{[ rockcontrol id:'rc-{{ '' | UniqueIdentifier }}' label:'{{ label }}' showlabel:'{{ showlabel }}' controltype:'rock-text-box' isrequired:'{{ isrequired }}' validationmessage:'{{ validationmessage }}' ]}
{% assign isrequired = isrequired | AsBoolean %}
{% if preaddon != empty or postaddon != empty %}<div class="input-group">{% endif %}
{% if preaddon != empty %}
<span class="input-group-addon">{{ preaddon }}</span>
{% endif %}
<input name="{{ name }}" type="{{ type}}" id="{{ id }}" class="form-control {% if size != empty %}input-{{ size }}{% endif %} {% if width != empty %}input-width-{{ width }}{% endif %}" value="{{ value }}" {% if isrequired == true %}required{% endif %} {{ additionalattributes }}>
{% if postaddon != empty %}
<span class="input-group-addon">{{ postaddon }}</span>
{% endif %}
{% if preaddon != empty or postaddon != empty %}</div>{% endif %}
{[ endrockcontrol ]}
Issue Confirmation
Rock Version
16.6
Description
Setting isrequired to false in the lava textbox shortcode does not work.
Actual Behavior
The input always has "required" on it, whether or not false is set.
Expected Behavior
The input required attribute should change depending on what is set on the shortcode.
Steps to Reproduce
{[ textbox name:'test' label:'Test' value:'test' isrequired:'false' ]}This will cause fields that should not be required to be required on forms.

In my testing, I was able to make a functional version of the Text Box by moving the assign for isrequired inside of the rock control shortcode body, such as this:
Issue Confirmation
Rock Version
16.6