Results 1 to 5 of 5

Thread: strip down version of activity - help needed

  1. #1
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default strip down version of activity - help needed

    I want to create a new module much similar lines of activity, but a strip down version of it. Before I start I implementing it, I thought ask the forum and embark on it.

    My requirement is : Module (M) has data capture forms depending upon devices. A sprinkler device has different data parameters. A safety valve has different parameters. In my case it is atleast 100+ forms(devices) displayed by their subject names. When the user clicks a form type abc under the listview, the edit/create view of the form abc appears.

    It is almost similar to activities, but a strip down version. The various forms are meant for data capture. There is no due date, reminders, .....All I need is a plain data capture forms. For a device of type 123, the parameters that are captured in the new device are all shown in the form. A future extension is clients can copy a form type and boom. They got a new device type + form.

    I will show the module list view.

    DeviceType Subject Description Location .

    That's all.

    In the subpanel module, Create is little tricky. The user has to select a type of form and then display the UI elements. Select is okay.

    Rescriction of the design: NO new modules other than M.

    any ideas, Please.
    Last edited by sugarcare; 2006-05-04 at 08:41 PM.

  2. #2
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: strip down version of activity - help needed

    an alternate method is to store the editview files directly in the DB with the values and state of form elements.

    The schema of the forms is
    #, Name, Date modified, user_modified, Html_files,

    Upon clicking the name in the list view, the html file is retrieved and rendered on the editview screen with the states and data captured.


    So, end users can create html files with form elements. Save the file in the modules. But when data is captured, store the file in DB.

    This relieves me from making modules, or creating tables for each form. It is like storing the source of editview html files in DB itself.

    any thoughts? I know memory is a consideration. But the end user may be okay with it.
    Last edited by sugarcare; 2006-05-05 at 04:56 PM.

  3. #3
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: strip down version of activity - help needed

    So is the answer - IFRAMES? is that the final answer?

  4. #4
    ruchida's Avatar
    ruchida is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Feb 2005
    Location
    Japan
    Posts
    1,375

    Default Re: strip down version of activity - help needed

    Another idea is to serialize all of pairs of a key & value (name & value in html) and save them in a single text field. The similar logic is implemented in the User module. It's user_preferences property has a text field, but all of currency, timezone, dataformat, smtpserver, etc. are encoded into it and saved in the user_preference culumn in the users table.

    This is a little bit techy but make the module very simple, and make it easy to create as many as html forms.

    Please look into modules/Users/User.php for more details. The setPreference() encodes keys and values, and getPreference() decodes them.
    Ryuhei Uchida
    Help Forum Moderator
    Calendar 2.0
    http://blogs.itmedia.co.jp/ruchida/

  5. #5
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: strip down version of activity - help needed

    Thanks a lot. That was a good clue. I will try to implement.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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