From ebcca61ae932d8979815a894d21950fab25f749e Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Wed, 13 Dec 2017 14:05:51 -0500 Subject: [PATCH] Removed extraneous output and solved various undefined parameter problems. --- classes/customFieldSupport.php | 6 +++--- views/front/customFields/displayForm.html | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/classes/customFieldSupport.php b/classes/customFieldSupport.php index 6f0918d..e110d31 100644 --- a/classes/customFieldSupport.php +++ b/classes/customFieldSupport.php @@ -142,12 +142,12 @@ class GlmCustomFieldSupport extends GlmDataFieldsCustomFields $fieldRes = array( 'field_name' => $fieldVal['field_name'], 'field_prompt' => $fieldVal['field_prompt'], - 'field_type' => $fieldVal['field_type']['name'], + 'field_type' => $fieldVal['field_type'], 'field_data' => false ); // Get field data - switch ($fieldVal['field_type']['name']) { + switch ($fieldVal['field_type']) { case 'text': case 'textarea': @@ -275,7 +275,7 @@ class GlmCustomFieldSupport extends GlmDataFieldsCustomFields // For each field foreach ($submitResult['formFields'] as $field) { - $fType = $field['field_type']['name']; + $fType = $field['field_type']; // If this is an update of existing data if ($formUpdate) { diff --git a/views/front/customFields/displayForm.html b/views/front/customFields/displayForm.html index ffcca51..3ccce59 100644 --- a/views/front/customFields/displayForm.html +++ b/views/front/customFields/displayForm.html @@ -1,6 +1,6 @@ {if $haveForm} {foreach $formFields as $field} - {if $field.field_type.name == 'text'} + {if $field.field_type == 'text'}
{$field.field_prompt}
@@ -8,7 +8,7 @@
{/if} - {if $field.field_type.name == 'textarea'} + {if $field.field_type == 'textarea'}
{$field.field_prompt}
@@ -16,7 +16,7 @@
{/if} - {if $field.field_type.name == 'checkbox'} + {if $field.field_type == 'checkbox'}
  {$field.field_prompt} @@ -37,7 +37,7 @@ if ( {assign var="testSep" value=''} {foreach $formFields as $field} - {if $field.required.value && ( $field.field_type.name == 'text' || $field.field_type.name == 'text' ) } + {if $field.required.value && ( $field.field_type == 'text' || $field.field_type == 'text' ) } {$testSep} $('#glmCustomFormField_{$field.id}').val() == '' {$testSep='||'} {/if} -- 2.17.1