SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Dec 2004
    Location
    USA
    Posts
    1,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help thinking through this complicated form design

    I hope this is the appropriate place to post this.

    I have an existing form using PEAR HTML_QuickForm that works fine. But...the database and logical design has changed a little. Formerly, the database record was related to a company. now the record has "child" records - records related to this record.

    I want a form that represents this easily to the user. So I thought of a form with some basic record information with the option of adding child records on that same form.

    The problem with that is:
    1- you never know how many child records there might be
    2- if you do a page refresh, with saving first, current field data will be lost for new records - no easy way to work-around in HTML_QuickForm.

    Ideally, I could refresh the page as they add a new child record and it would display a link to that new child record. This would work except if they edit the field on the main record page since it would not be saved when page is refreshed without saving first - see above. Clear as mud?

    Should I have one form for editing basic main record data then another for viewing that data and editing/adding new child records? Or is there another way around it?

    Many thanks for your insight!

  2. #2
    SitePoint Zealot agoossens's Avatar
    Join Date
    Mar 2004
    Location
    Adelaide, Australia
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a pretty typical form/subform problem.

    I would have two forms. First firm: creates the parent record. Second form: creates the child records. Don't provide the second form until the first record is created.

    It doesn't make sense to create child records if you haven't created the parent record (MS Access, I'm looking at YOU).
    This space for rent.

  3. #3
    SitePoint Wizard
    Join Date
    Dec 2004
    Location
    USA
    Posts
    1,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks


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
  •