create a pair of fields, one creating a showon the other a text box.
add showon and required to the textbox.
turn off showon
go to form in admin and attempt to save.
required will not be tested since showon is false.
required error is thrown.
<fieldset name="SERENITY_FONTS">
<field
name="googleFonts"
type="radio"
class="btn-group"
default="0"
label="TPL_SERENITY_FONTS_LABEL"
description="TPL_SERENITY_FONTS_DESC"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="Font"
label="TPL_SERENITY_GET_FONTS_NAME_LABEL"
description="TPL_SERENITY_GET_FONTS_NAME_DESC"
class="medium-input"
filter="raw"
showon="googleFonts:1"
type="text"
default=''
required='1'
/>
<field name="Css"
label="TPL_SERENITY_GET_FONTS_CSS_LABEL"
description="TPL_SERENITY_GET_FONTS_CSS_DESC"
class="medium-input"
type="text"
filter = "html"
showon="googleFonts:1"
default=''
required='1'
/>
</fieldset>
Labels |
Added:
?
|
ugh.... ok.. I'll just have to check for empty field.. ty... sorry for false report.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-12 20:24:26 |
Closed_By | ⇒ | N6REJ |
showon
is a UI parameter only, it isn't altering other attributes of the form such asrequired
.Further explained in #11243 why this is how the system is designed.