Menu

Form features

Help
2006-03-04
2013-04-15
  • Wolf Naegeli

    Wolf Naegeli - 2006-03-04

    I have not worked completely through all documentation yet but on first pass throug, I didn't see anything how or whether the following things can be done:

    1) I was quite surpirsed that tables--at least by default--cannot be sorted by clicking on a colum name. Is there a way to turn that on?

    2) In a form, is there a way to submit fields to more than one table?

    3) Can I use a spreadsheet-like form that submits multiple records to a table at once? E.g for something like a survey of passengers on bus routes:

    Route  Name             Women    Men   Children
    66       North Shore      5            3       7
    73       Ashbury Loop   1            5       0
    etc.

    Where the Route number would be a fixed value hardwired in the form, Name would come from a lookup table based on the route number, the user would be filling in the passenger counts only, and on SUBMIT, all five values for all rows in the form would be written to a results table at once.

    4) Is there a way to enable/disable some fields conditional to the user's choice from a previous question. E.g. if I have a question with radio buttons for "Do you own a car?"  o Yes  o No
    And four additional questions, such as Make, Model, Year, Color, which should be ignored or dimmed when No is chosen.

     
    • Jonathan Maybaum

      Indeed, none of these things are currently included in SiteMaker. However, they can be accomplished in various ways, some better than others:

      1. Column sorting

      You can add sorting links to a custom template, like these:

      <a style="font-weight:bold; text-decoration:none" href="/<WebObject name=DataAccess_SiteID></WebObject>/<WebObject name=DataAccess_SectionName></WebObject>&sortColumn0=TaskName&sortDirection0=Ascending">&uarr;</a>
      <a style="font-weight:bold; text-decoration:none" href="/<WebObject name=DataAccess_SiteID></WebObject>/<WebObject name=DataAccess_SectionName></WebObject>&sortColumn0=TaskName&sortDirection0=Descending">&darr;</a>

      Shown at:
      http://sitemaker.umich.edu/to.do.list/view__to_do__items

      This is, of course, only one of many ways that you might decide to do it, depending on how you want it to look.

      2. Submitting fields to more than one table

      To really do this, Data Tables would need to be relational. This has been on our wishlist for quite a while, but would take a significant amount of effort. The only thing close at this time would be to put multiple IFRAMEs on a page, each one showing a different Data Access section (with each DA section fronting a different Data Table).

      3. Submitting data to multiple records at once

      If you mean adding multiple records on a single form, then, no. Currently, multiple records can only be added together by importing a text file.

      If the records already exist (for example, if you preloaded a bunch of blank records via import) then you can submit edits for multiple records at once, assuming that you have made the fields editable in List view.

      As for filling in Name as a result of selecting a Route number:
      I think that I would use a little client-side JavaScript for this. It would mean hardcoding into your DA template an array to use as a dictionary for relating Name to Route, then writing a JS function to set the value of the Name field when the Route popup is changed, and setting it as the onChange handler for the Route popup.

      This support topic is relevant:
      http://sitemaker.umich.edu/sitemaker.resources/View%20Topics&mode=single&recordID=769899

      We could chat about this if it's not clear.

      4. Conditionally enable/diable fields

      Yes, again using client-side JavaScript. See:
      http://sitemaker.umich.edu/sitemaker.resources/view_topics&mode=single&recordID=769900

       

Log in to post a comment.