To limit the type of characters that can be entered in the Contact Person field, use the plugin. Below is an example that you can adjust to suit your needs.
-
Create a file billmgr_mod_gcore_realname.xml in the /usr/local/mgr5/etc/xml/ directory with the following contents:
<?xml version="1.0" encoding="UTF-8"?> <mgrdata> <metadata name="register" type="form"> <form title="name"> <field name="realname"> <input type="text" name="realname" maxlength="128" check="certificatelatin" checkargs=",,,0123456789"/> </field> </form> </metadata> <handler name="user_realname_customize" type="xml"> <event name="clientoption" after="yes"/> </handler> </mgrdata>
Click here to expand... -
Create an executable file user_realname_customize in the /usr/local/mgr5/addon/ directory with the following contents:
#!/bin/sh while read line do echo "$line" | sed 's;<input type="text" name="user_realname";<input type="text" name="user_realname" check="certificatelatin" checkargs=",,,0123456789";' done < "${1:-/dev/stdin}
- Restart BILLmanager:
/usr/local/mgr5/sbin/mgrctl -m billmgr -R