I want to add code-id to registration form in opencart 2.0.3.1, but in admin panel just can choose
this type---> ( choose, choose File, Date) , my type of field is
"int"
and"unique"
and"its Length"
is 10 ?
How can I do this?
I want to add code-id to registration form in opencart 2.0.3.1, but in admin panel just can choose
this type---> ( choose, choose File, Date) , my type of field is
"int"
and"unique"
and"its Length"
is 10 ?
How can I do this?
Copyright © 2021 Jogjafile Inc.
Custom fields in Opencart don't have validation ability, so if you need validation, you must add your desired fields manually.
I've created a
vqmod
script that adds a new field with the type and length validation (it must be numeric with exactly 10 digits), the script adds new columncode_melli
with anUNIQE
index to prevent storing a duplicated entry.As the question is about registration form, this script prepared in this form only, if you want to let your customer edit it from their account or echo it in admin panel, you must improve it.
I've tested this on Opencart 2.0.3.1 with the default theme: