Link to home
Start Free TrialLog in
Avatar of Lee R Liddick Jr
Lee R Liddick JrFlag for United States of America

asked on

How to create Dynamic ColdFusion Drop Down and SQL tables

I need to create two forms that will have multiple dynamic drop down boxes.  I am using cold fusion and not sure if I want to use straight html CF form or use a flash format form.  

The user would select a business type (or multiple business types) and then based on that selection, they would get a selection of regions to choose in a drop down, and then based on the region (or regions) they select, they would be presented with a list of locations (which they can have multiple selections too), then based on the location(s) they select, they will be introduced with a list of applications.  I included how the basic form would look below.

I need to create the SQL tables and the form for this...does anyone have any suggestions on websites that will assist in how to create the tables to easily sort this information out and build the form using dynamic selections?  

I have done some of this in the past but not to this extent...and when I did it, I don't think I did it the correct way (although it works).  So I'm trying to do this the 'standard' correct way so I'm not creating a duct-tape application.


<cfform action="" method="post" name="myForm">
<table border="0" cellspacing="0" cellpadding="5">
    <tr>
        <td colspan="3">
            <table width="100%">
            <tr>
                <th><strong>Business:</strong>&nbsp; &nbsp;</th>
                <td><b>Telephone:</b><input type="checkbox" name="bus1" value="">&nbsp; &nbsp;</td>
                <td><b>Wireless:</b><input type="checkbox" name="bus2" value="">&nbsp; &nbsp;</td>        
                <td><b>Cable:</b><input type="checkbox" name="bus3" value="">&nbsp; &nbsp;</td>       
                <td><b>Satellite:</b><input type="checkbox" name="bus4" value="">&nbsp; &nbsp;</td>       
                <td><b>Pager:</b><input type="checkbox" name="bus5" value="">&nbsp; &nbsp;</td>      
            </tr>
            </table>
    	</td>
    </tr>
    <tr> 
        <th align="right">
        	Region(s):
        </th>
        <td colspan="2"> 
            <select name="regions" multiple style="width:240px" size="4">
            <option value="">List of Regions</option>
            </select>					
        </td>
    </tr>
    <tr> 
        <th align="right">
             <a class="tiny" href="#">
                <b>Location(s) by Region</b>
            </a>
        </th>
        <td colspan="2">
            <select name="locations" multiple style="width:240px" size="4">
            <option value="">List of Locations</option>
            </select>
        </td>
    </tr>
    <tr> 
        <th align="right">
            Primary System:
        </th>
        <td colspan="2"> 
            <select name="systems" style="width:300px">
            <option value="">List of Systems</option>
            </select>							
        </td>
    </tr>
</table>
</form>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of digicidal
digicidal
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee R Liddick Jr

ASKER

Let me take a look at this as we are moving to CF8 shortly.
In general, I would highly recommend it - although you might as well move directly to CF9 (since it's out now, and then you will have the latest ExtJS stuff in there as well).  If nothing else, the speed of CF9 is a little better than CF8 - plus if you are planning on running the Enterprise edition, it's pricey - but the server management console is very nice for tuning applications - especially if you are running multiple sites/servers.

You can also (if you are staying with MX/7) just look into a manual implementation of ExtJS or JQuery to have the same AJAX functionality - it takes a little more effort to implement, but then you have complete control over it (at the expense of the RAD-ability of just using CFFORM to implement the same elements).

You can also simply do a manual javascript relationship by combining a <cfoutput> block with a javascript function embedded in it to set up your arrays for the related selects.