Add a field to registration
Adding a field to the registration process of your client is simple:
- Just add another input field to form/fieldset/user_billing.tpl
1<input name="invadr[oxuser__company2]" type="text" value="[{$invadr.oxuser__company2}]" />
- Add the field COMPANY2 to the OXUSER table of your database
- Don’t forget to save the changed template to your custom template folder according to
- https://oxidforge.org/en/understanding-oxid-eshop-template-hierarchy-and-override-system.html
- Clear the /tmp/ folder
- You are done!
How can I add error message for the newly added filed?
Like this [{include file=”message/inputvalidation.tpl” aErrors=$aErrors.oxuser__company2}] ??
Try using something like this (not approved): https://github.com/OXID-eSales/flow_theme/blob/master/tpl/form/user.tpl#L27