From a488bffcf2697c74ec2d277e5e416e98e0528735 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 8 Jul 2019 16:46:40 -0400 Subject: [PATCH] Add checkbox working on more field types --- views/ui/f6/checkbox.html | 57 +++++++++++++-------------------------- 1 file changed, 18 insertions(+), 39 deletions(-) diff --git a/views/ui/f6/checkbox.html b/views/ui/f6/checkbox.html index b5635f8b..8d8e16c7 100644 --- a/views/ui/f6/checkbox.html +++ b/views/ui/f6/checkbox.html @@ -4,50 +4,29 @@ Only 0ne of $data or $field may be used. Do not list fields if they're false. (We're not checking for false) - {$fieldData = [ - 'data' => array Data from data abstract if using that, + {$ui = [ + 'value' => string Value of the element 'field' => string Name of field that holds the data if not using data abstract, 'label' => string Label text for this field, + 'required' => boolean True if required, 'helpText' => string Help text for this input, + 'errortext' => string Error text that appears when the field doesn't validate, + 'dataError' => string Error from data Abstract Class ]} *} -{if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)} -
-
- Field Error: Required field information not supplied! -
+
+
+ + + + {if $ui.dataError}{$ui.dataErrror}{/if} + {if isset($ui.helpText)}

{$ui.helpText}

{/if} + {if isset($ui.errorText)}{$ui.errorText}{/if}
-{else} - {if isset($fieldData.data)} {* If using data abstract *} - {$field = $fieldData.field} -
-
- - +
- {if $fieldData.data.fieldFail.$field}{$fieldData.data.fieldFail.$field}{/if} - {if isset($fieldData.helpText)}

{$fieldData.helpText}

{/if} - {if isset($fieldData.errorText)}{$fieldData.errorText}{/if} -
-
- {else} -
- -
- {/if} -{/if} -- 2.17.1