×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    1

    basic question involving using the inputted data from a form

    Hi, I'm trying to make an app that will involve a form then using the value entered in the form to calculate an output.
    Eg the user inputs 1 2 and 3 in the for and these would then be used, ie. a + b + c = 1 + 2 + 3 = 6 then this is displayed in a new form
    So far, for the inpout form i have;


    Code:
    def form1():
    data = [(u'A','text', u'0'),(u'B','text', u'0'),(u'C','text', u'0')]
    
        flags = appuifw.FFormEditModeOnly
    
        f = appuifw.Form(data, flags)
    
        f.execute()
    
    form1()
    This does what I want, in that the user can enter stuff into the the form, but i can't work out how to use the value and perform operations on it once it has been inputted.
    Also, when using 'number' instead of text in data is there a way to allow a decimal point, ie float value?

    Please try to explain stuff in basic terms because i have next to no experience in coding etc.

    Thanks very much

  2. #2
    Registered User
    Join Date
    Feb 2006
    Location
    Helsinki, Finland
    Posts
    168

    Re: basic question involving using the inputted data from a form

    Hello,

    I hope this helps:

    Code:
    #Use 'number' for numeric input. Also 'float' can be used.
    data = [(u'A','number', 0),(u'B','number', 0),(u'C','number', 0)]
    
    flags = appuifw.FFormEditModeOnly
    f = appuifw.Form(data, flags)
    f.execute()
    
    #A is changed to 8
    #B is changed to 2
    #C is changed to 35
    
    #Form is submitted
        
    #Now the new values of the form are stored in f in the same
    #format as they were originaly defined.
    
    #So access the values like this:
    A=f[0][2] # The type 'number' returns a long type int.
    B=f[1][2]
    C=f[2][2]
    
    #now you can play with those values how you want ;)
    
    #Then just make a new form with the values of the previous form :)
    Best Regards,
    Richard
    Nokia E66
    PyS60 1.4.4 final

  3. #3
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: basic question involving using the inputted data from a form


    @ChrisSelim : Could you please send me another email address because I can't send you any email

    BR
    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

Similar Threads

  1. Form - unable to write data
    By ninidotnet in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-09-18, 08:13
  2. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  3. Nokia 6600 Socket Server send delay Problem
    By dicson_hu in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-31, 07:37
  4. A basic question
    By madhu_rg in forum General Messaging
    Replies: 1
    Last Post: 2002-10-09, 06:05
  5. Data suite for 8850 question (how can I bypass the irda setup)
    By glenn_johnson in forum General Messaging
    Replies: 1
    Last Post: 2002-09-26, 13:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •