Forms

#Forms
import appuifw, e32

#Define the exit function
def quit():
    app_lock.signal()
appuifw.app.exit_key_handler=quit


def forming():
#Create a list to be used in 'combo' selection mode
    model=[u'6630', u'E90', u'7610', u'N95', u'N73']

#Define the field list (consists of tuples: (label, type ,value)); label is a unicode string
#Type is one of the following strings: 'text', 'number', 'date', 'time',or 'combo'
data=[(u'Mobile','text', u'Nokia'),(u'Model','combo', (model,0)),(u'Amount','number', 5),(u'Date','date'),(u'Time','time')]

#Set the view/edit mode of the form
flags=appuifw.FFormEditModeOnly

#Create an instance of the form
f=appuifw.Form(data, flags)

#Make the form visible on the UI
f.execute()

#Call the function that creates the form
forming()

app_lock=e32.Ao_lock()
app_lock.wait()