Results 1 to 8 of 8

Thread: How do I add large drop down list to forms?

  1. #1
    Shannell
    Guest

    Default How do I add large drop down list to forms?

    I have 450 suburbs that I have to add to a form. Im ok with using the NOF
    form creation tool, but it looks like I have to add each line manually... No
    way Im going to be doin that. Is there a way I can paste in the info I have?



  2. #2
    Guest

    Default Re: How do I add large drop down list to forms?

    ..
    This sounds like it could be easily handled with a database (to record the suburbs) and then creating the select options using a loop.

    Coldfusion has a <cfselect> tag which does this rather neatly. Just query the database and draw the select box from the results using a couple of lines of code outlining the options required.

    OR you can call in a list of options using an include statement but you would have to maintain the option file separately. Faster and neater than trying to use a fusion select form tool as you may run into a glass ceiling at around 255 options (I've never tried to put that many into Fusion before)

    Here is a select I put together using a prewritten file of countries that I use on many forms

    http://www.gotfusion.com/misc/includeSelect.cfm

    It is a simple select with a cfinclude reading the list of options

    <select name="country">
    <cfinclude template="./folder/fileName.cfm">
    </select>

    the included file file is a simple text file and looks like this:

    <option value="null" selected>Please select a country </option>
    <option value="United_States_of_America">United States of America</option>
    <option value="Australia">Australia</option>
    <option value="Canada">Canada</option>
    <option value="Germany">Germany</option>
    <option value="United_Kingdom">United Kingdom</option>.........

    more options follow and you can have as many as you wish or need

    The included file is just a list of option values.. of course you have to write this file before you can use it but since it is a simple text file it is easy to create and easy to maintain... BUT like I said a database and <cfselect> is a lot slicker and easier to create and maintain.


    --
    Mike

    gotHosting.biz - Industrial Strength Web Hosting Solutions
    Created for Fusion users by Fusion users with support in mind
    http://www.gotHosting.biz - Web hosting from someone you trust
    ColdFusion, PHP, ASP, ASP.NET, MySQL, Access, MS SQL Server

    --


    Shannell said:

    | I have 450 suburbs that I have to add to a form. Im ok with using
    | the NOF form creation tool, but it looks like I have to add each
    | line manually... No way Im going to be doin that. Is there a way I
    | can paste in the info I have?



  3. #3
    LBA
    Guest

    Default Re: How do I add large drop down list to forms?

    turtle's suggestion (use a database) is the best one. But if you are
    not prepared to go that route, you could use a spreadsheet to create the
    code for you and then use NOF's Control-T method to insert the code.
    You would take your list of suburbs and put them all in a spreadsheet
    column. In a cell to the right, add code to build the HTML for you by
    using Excel's Concatenate function to join the strings of text. You
    would take this:

    <option value="

    and then join that with the cell to the left (the suburb), and then join
    it with:

    ">

    and then join that with the cell to the left again, and then join it with:

    </option>

    The result would be this:
    <option value="Smallville">Smallville</option>

    Copy your formula down the page and you've created the list of 450
    drop-down options. Then paste that code within your NOF form where you
    want the drop-down to be and you're done. I have often used Excel to
    create code like this, such as for a long list of page links or for
    other similarly repetitive/tedious tasks.

    Laurence





    Shannell wrote:
    > I have 450 suburbs that I have to add to a form. Im ok with using the NOF
    > form creation tool, but it looks like I have to add each line manually... No
    > way Im going to be doin that. Is there a way I can paste in the info I have?
    >
    >
    >


  4. #4
    Shannell
    Guest

    Default Re: How do I add large drop down list to forms?

    Ok looks like I could figure that out, but could it be integrated into the
    forms handler in NOF? od would I have to create the whole form manually?

    <gotFusion.com> wrote in message news:A921.1172466992.78@gfwebforum.com...
    > .
    > This sounds like it could be easily handled with a database (to record the
    > suburbs) and then creating the select options using a loop.
    >
    > Coldfusion has a <cfselect> tag which does this rather neatly. Just query
    > the database and draw the select box from the results using a couple of
    > lines of code outlining the options required.
    >
    > OR you can call in a list of options using an include statement but you
    > would have to maintain the option file separately. Faster and neater than
    > trying to use a fusion select form tool as you may run into a glass
    > ceiling at around 255 options (I've never tried to put that many into
    > Fusion before)
    >
    > Here is a select I put together using a prewritten file of countries that
    > I use on many forms
    >
    > http://www.gotfusion.com/misc/includeSelect.cfm
    >
    > It is a simple select with a cfinclude reading the list of options
    >
    > <select name="country">
    > <cfinclude template="./folder/fileName.cfm">
    > </select>
    >
    > the included file file is a simple text file and looks like this:
    >
    > <option value="null" selected>Please select a country </option>
    > <option value="United_States_of_America">United States of America</option>
    > <option value="Australia">Australia</option>
    > <option value="Canada">Canada</option>
    > <option value="Germany">Germany</option>
    > <option value="United_Kingdom">United Kingdom</option>.........
    >
    > more options follow and you can have as many as you wish or need
    >
    > The included file is just a list of option values.. of course you have to
    > write this file before you can use it but since it is a simple text file
    > it is easy to create and easy to maintain... BUT like I said a database
    > and <cfselect> is a lot slicker and easier to create and maintain.
    >
    >
    > --
    > Mike
    >
    > gotHosting.biz - Industrial Strength Web Hosting Solutions
    > Created for Fusion users by Fusion users with support in mind
    > http://www.gotHosting.biz - Web hosting from someone you trust
    > ColdFusion, PHP, ASP, ASP.NET, MySQL, Access, MS SQL Server
    >
    > --
    >
    >
    > Shannell said:
    >
    > | I have 450 suburbs that I have to add to a form. Im ok with using
    > | the NOF form creation tool, but it looks like I have to add each
    > | line manually... No way Im going to be doin that. Is there a way I
    > | can paste in the info I have?
    >
    >
    >




  5. #5
    Guest

    Default Re: How do I add large drop down list to forms?

    ..
    If you are talking about the version 9 forms handler component... no, the forms handler component in version 9 is a closed system and cannot do anything more than what comes built into the component (i.e. there is no external insertion available).

    You would have to create the form page using the tools on the form toolbar and process the page with an external script.

    If your host supports coldfusion processing forms to email is a simple <cfmail> tag.

    --
    Mike

    gotHosting.biz - Industrial Strength Web Hosting Solutions
    Created for Fusion users by Fusion users with support in mind
    http://www.gotHosting.biz - Web hosting from someone you trust
    ColdFusion, PHP, ASP, ASP.NET, MySQL, Access, MS SQL Server

    --


    Shannell said:

    | Ok looks like I could figure that out, but could it be integrated
    | into the forms handler in NOF? od would I have to create the whole
    | form manually?




  6. #6
    Shannell
    Guest

    Default Re: How do I add large drop down list to forms?

    Thanks guys, given me something to do tomorrow!

    "LBA" <webdesigns@no2spamabramsnet.com> wrote in message
    news:erttou$o9k1@flsun90netnews01.netobjects.com.. .
    > turtle's suggestion (use a database) is the best one. But if you are not
    > prepared to go that route, you could use a spreadsheet to create the code
    > for you and then use NOF's Control-T method to insert the code. You would
    > take your list of suburbs and put them all in a spreadsheet column. In a
    > cell to the right, add code to build the HTML for you by using Excel's
    > Concatenate function to join the strings of text. You would take this:
    >
    > <option value="
    >
    > and then join that with the cell to the left (the suburb), and then join
    > it with:
    >
    > ">
    >
    > and then join that with the cell to the left again, and then join it with:
    >
    > </option>
    >
    > The result would be this:
    > <option value="Smallville">Smallville</option>
    >
    > Copy your formula down the page and you've created the list of 450
    > drop-down options. Then paste that code within your NOF form where you
    > want the drop-down to be and you're done. I have often used Excel to
    > create code like this, such as for a long list of page links or for other
    > similarly repetitive/tedious tasks.
    >
    > Laurence
    >
    >
    >
    >
    >
    > Shannell wrote:
    >> I have 450 suburbs that I have to add to a form. Im ok with using the NOF
    >> form creation tool, but it looks like I have to add each line manually...
    >> No way Im going to be doin that. Is there a way I can paste in the info I
    >> have?
    >>
    >>

    >




  7. #7
    LBA
    Guest

    Default Re: How do I add large drop down list to forms?

    No, you don't want to edit the final HTML page... at least, not if you
    can help it. Click on an individual cell within the talble... and then
    us the HTML button... or better yet, you might find that Control-T is a
    more appropriate way to get it where you want it.

    Laurence


    Shannell wrote:
    > Yes this is working for me so far, I like it. Im wondering if I can put this
    > into the layout region that is defined as a form.. Clicking html for the
    > region doesnt look like I can add it to the code correctly. Maybe I can just
    > edit the final html page in notepad.
    > Thanks Ill report back on how Im going.
    >
    > "LBA" <webdesigns@no2spamabramsnet.com> wrote in message
    > news:erttou$o9k1@flsun90netnews01.netobjects.com.. .
    > > turtle's suggestion (use a database) is the best one. But if you are not
    > > prepared to go that route, you could use a spreadsheet to create the code
    > > for you and then use NOF's Control-T method to insert the code. You would
    > > take your list of suburbs and put them all in a spreadsheet column. In a
    > > cell to the right, add code to build the HTML for you by using Excel's
    > > Concatenate function to join the strings of text. You would take this:
    > >
    > > <option value="
    > >
    > > and then join that with the cell to the left (the suburb), and then join
    > > it with:
    > >
    > > ">
    > >
    > > and then join that with the cell to the left again, and then join it with:
    > >
    > > </option>
    > >
    > > The result would be this:
    > > <option value="Smallville">Smallville</option>
    > >
    > > Copy your formula down the page and you've created the list of 450
    > > drop-down options. Then paste that code within your NOF form where you
    > > want the drop-down to be and you're done. I have often used Excel to
    > > create code like this, such as for a long list of page links or for other
    > > similarly repetitive/tedious tasks.
    > >
    > > Laurence
    > >
    > >
    > >
    > >
    > >
    > > Shannell wrote:
    > >> I have 450 suburbs that I have to add to a form. Im ok with using the NOF
    > >> form creation tool, but it looks like I have to add each line manually...
    > >> No way Im going to be doin that. Is there a way I can paste in the info I
    > >> have?
    > >>
    > >>

    > >

    >
    >
    >


  8. #8
    Shannell
    Guest

    Default Re: How do I add large drop down list to forms?

    Yes this is working for me so far, I like it. Im wondering if I can put this
    into the layout region that is defined as a form.. Clicking html for the
    region doesnt look like I can add it to the code correctly. Maybe I can just
    edit the final html page in notepad.
    Thanks Ill report back on how Im going.

    "LBA" <webdesigns@no2spamabramsnet.com> wrote in message
    news:erttou$o9k1@flsun90netnews01.netobjects.com.. .
    > turtle's suggestion (use a database) is the best one. But if you are not
    > prepared to go that route, you could use a spreadsheet to create the code
    > for you and then use NOF's Control-T method to insert the code. You would
    > take your list of suburbs and put them all in a spreadsheet column. In a
    > cell to the right, add code to build the HTML for you by using Excel's
    > Concatenate function to join the strings of text. You would take this:
    >
    > <option value="
    >
    > and then join that with the cell to the left (the suburb), and then join
    > it with:
    >
    > ">
    >
    > and then join that with the cell to the left again, and then join it with:
    >
    > </option>
    >
    > The result would be this:
    > <option value="Smallville">Smallville</option>
    >
    > Copy your formula down the page and you've created the list of 450
    > drop-down options. Then paste that code within your NOF form where you
    > want the drop-down to be and you're done. I have often used Excel to
    > create code like this, such as for a long list of page links or for other
    > similarly repetitive/tedious tasks.
    >
    > Laurence
    >
    >
    >
    >
    >
    > Shannell wrote:
    >> I have 450 suburbs that I have to add to a form. Im ok with using the NOF
    >> form creation tool, but it looks like I have to add each line manually...
    >> No way Im going to be doin that. Is there a way I can paste in the info I
    >> have?
    >>
    >>

    >




Posting Permissions

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