Add/Edit Fields
- SQL Field Name is the name used when create SQL table
- Field Label is what you see on forms next to input box
- SQL Type is type of field (SQL valid fields)
incremental means the next value will be max(values)+1
currentdate is ZopeTime converted to integer
username is REQUEST.AUTHENTICATED_USER.getUserName()
- SQL Size when is > 1 it will be used to specify SQL field size
- Form Type is useful when you build add/list/edit forms
It can be standard HTML form field types (text,password,textarea,file)
it also my be date field selected from a popup window (date)
or special lists and selections.
When is list you can select multiple items and the result will be a python list (like [1,6,15])
When is select you can select only one item from list
In both cases (list and select) the SQL query used for selection will be
taken from field Options
- Form Size is the size of field from add/edit form document
- Options is the default value for Form Type=text,password,date,textarea
also is the start number for SQL Type="incremental"
or is the information used to build the list when Form Type="list", "select" or "m_select"
here are some samples for this field (when Form Type="list" or "select"):
- tablename,code,name,whereclause,sort_clause
- countries,countrycode,countryname,countrycode>445,countryname desc
- dep,depkey,depname,depkey<5 and depkey>1,dep_name asc
where_clause and sort_clause are optional (you don't need to fill that fields)
first is table name, second is field code, third is field name, fourth is where clause, then sort clause
(name is what you see on form, code is what is stored into database)
"m_select" means manual populated select list
for Form Type="m_select" fill this field like:
- value:label,value:label,value,value,...
- 1:yes,2:no,3:maybe,4,5,6
- m:Masculine,f:Feminine
That means you specify value and label separated by ":"
but you may not include label if you want (default is = value).
- Unique - check this (carefully) if you want to do extra checking before add/edit data
- Mandatory - check this if you want a JavaScript validation before to submit form.
I put this options for some fields like email or Full Name which must be filled!