diff options
author | Christopher Burger <burgerc@freeside.biz> | 2019-01-09 12:28:19 -0500 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2019-01-09 12:28:19 -0500 |
commit | 057fc61586d26199005660b908ece68a7a1da681 (patch) | |
tree | 9b8e4717f0172e32c10af88a3bc37900530c94e9 /httemplate/edit/elements | |
parent | 0edb6050aeb65200869a12d83d8de794ed384154 (diff) |
RT# 81249 - added ability to validate price plan option fields
Diffstat (limited to 'httemplate/edit/elements')
-rw-r--r-- | httemplate/edit/elements/edit.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index feec098f3..5e7b30674 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -820,6 +820,18 @@ Example: : $opt{'html_bottom'} %> +% ## set extra field values for validation. ie price plan fields +% my $extra_fields_to_validate = $opt{'extra_fields_validate'}; +% my %validate_error_messages = ( +% 'digits' => 'Please only enter numbers here.', +% 'email' => 'Please enter a valid email here.', +% ); +% foreach my $extra_fields (keys %$extra_fields_to_validate) { +% my $validate_type = $extra_fields_to_validate->{$extra_fields}; +% $js_form_validate->{edit_topform}->{validate_fields}{$extra_fields} = $validate_type.': true'; +% $js_form_validate->{edit_topform}->{error_message}{$extra_fields} = $validate_error_messages{$validate_type}; +% } + % unless ($opt{'embed'}) { <BR> |