Dynamic Form Question

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Emmett Power (Emmett_at_Silico-Research.com)
Date: 06/25/04

  • Next message: Joe Fawcett: "Re: Converting svgcheck.vbs to a java script"
    Date: 25 Jun 2004 00:56:51 -0700
    
    

    Hi,

    I have a problem that has me stumped and I wonder if somebody has a
    suggestion or workaround for this problem.

    My objective is to let the user enter the details of organisations
    he/she has worked with and then to rank them on certain parameters. I
    don't want to restrict the user to a list of organisations.

    To achieve this I have one a number of linked web based forms:

    On form1 there are six free text boxes where the user can enter the
    names of organisations that he/she has worked with.

    On form2 the user is presented with the list of organisations that he
    has entered and asked to rank them. The form is populated using a
    script that loops through the user's selection from the database and
    creates data entry fields for each option.

    One the data validation page I capture the information from form2
    using the following script:

    <%

    arrSelectionID= split(request("SelectionID"),",")
    arrReputation= split(request("Reputation"),",")
     
    for i = 0 to ubound(arrSelectionID)
       
    vrsSelectionID = arrSelectionID(i)
    vrsReputation = arrReputation(i)
        
    sqlString = "UPDATE Selection SET
    Reputation='"&Trim(vrsReputation)&"'WHERE SelectionID
    ="&vrsSelectionID&""

    %>

    forms3 and so on replicate this process asking the user to rank on
    other characteristics.

    So far so good.

    Here's the problem. I would like the user to be able to use option
    buttons to select a value for each organisation but the buttons
    created by the loop script have the same name for each organisation
    which doesn't work because the user is only able to select one button
    for all the organisations.

    I've tried tick boxes to get around that problem but the
    split(request("Reputation"),",") is thrown if the user does not select
    one option and one option only for each organisation.

    I can use a drop down box instead of option buttons to force one value
    per selection but I don't like using a lot of drop down boxes in a
    form because I think that users quickly tire of click-dropdown-select.

    I hope that the explanation of my problem makes sense.

    I'd appreciate any suggestions for a work around or a simple solution.
    I don't mind forcing the user to enter the data with a JS validation
    script if I could construct one that was able to handle the dynamic
    elements of the form.

    Thanks in advance.

    Emmett Power


  • Next message: Joe Fawcett: "Re: Converting svgcheck.vbs to a java script"
  • Quantcast