Ok, so I have an idea, but I'm not sure how to carry it through.

I have a basic insert record page. However, I want the person to be able
to add 5, 10, or 15 records at a time, depending on the value they
select from a drop-down. Meaning, depending on how many they want to
add, there will be that many forms, and one submit button to add all the
records.

I'm thinking I need a loop somewhere, but not sure where.

Any help is greatly appreciated!

Here's what I have so far:

addSite.cfm:


<form name="MultiForm"
action="addSite.cfm?MultiForm=TRUE&NumForms=#NumForms#">
  <select name="NumForms">
       <option value="5">5</option>
    <option value="10" selected>10</option>
        <option value="15">15</option>
  </select>
  <input name="" type="submit" value="Show">
</form>

 <cfif MultiForm IS True>
<form action="addSite2.cfm" method="post" name="addSite">
   <cfloop from="0" to="URL.NumForms" index="i">
  <table width="100%" border="0" cellspacing="2" cellpadding="5">
    <tr> 
      <td width="24%" class="copyTeal"><div align="right">Author Name:
</div></td>
      <td width="76%"><input name="Website_author" type="text"
id="Website_author"></td>
    </tr>
    <tr> 
      <td class="copyTeal"><div align="right">Website link:</div></td>
      <td><p>
          <input name="Website_Link" type="text" id="Website_Link"
size="45">
        </p>
        <p><span class="tealHeader">Please include the http:// and
remember to 
          verify the link's accuracy.</span></p></td>
    </tr>
  </table>
  <p class="tealHeader">
    <input type="submit" value="Continue">
  </p></cfloop>
  </form>
  
  <cfelse>
  <form action="addSite2.cfm" method="post" name="addSite">
   <table width="100%" border="0" cellspacing="2" cellpadding="5">
    <tr> 
      <td width="24%" class="copyTeal"><div align="right">Author Name:
</div></td>
      <td width="76%"><input name="Website_author" type="text"
id="Website_author"></td>
    </tr>
    <tr> 
      <td class="copyTeal"><div align="right">Website link:</div></td>
      <td><p>
          <input name="Website_Link" type="text" id="Website_Link"
size="45">
        </p>
        <p><span class="tealHeader">Please include the http:// and
remember to 
          verify the link's accuracy.</span></p></td>
    </tr>
  </table>
  <p class="tealHeader">
    <input type="submit" value="Continue">
  </p>
  </form>
    
  </cfif>


The problem is that the page is trying to run the loop regardless of if
the upper form has been submitted or not. And then it says that my "to"
value is invalid because it isn't a simple data type.

Thanks for taking the time to read my rambling :)

Candace K. Cottrell, Web Developer 
The Children's Medical Center 
One Children's Plaza 
Dayton, OH 45404 
937-641-4293 
http://www.childrensdayton.org

 
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to