5 Replies - 8103 Views - Last Post: 23 December 2004 - 01:23 PM Rate Topic: -----

#1 mindytruitt  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 09-August 04

Nested Forms Problem

Post icon  Posted 09 August 2004 - 12:20 PM

I am not even sure it is possible, but I wanted to see if I could nest forms. Both forms work indivdually but when put together I can't get them to work. Any help??

<form name="contact" method="post" action="VCEntryVerify.cfm">
<input type="text" name="PurchaseDate">

<FORM NAME="categoryform" METHOD="POST" ACTION="">

<SELECT NAME="Customer" onchange="change_Contact_menu(this.selectedIndex);">
<OPTION VALUE="null" selected>Customer</OPTION>
<OPTION VALUE="null">---------------------------------</OPTION>
<CFOUTPUT QUERY="Customer">
<option value="#CustomerID#">#Customer#</option>
</CFOUTPUT>
</SELECT>

<SELECT NAME="Contact_select" >
<OPTION VALUE="null" selected>Contact
<OPTION VALUE="null">---------------------------------
<OPTION VALUE="null">
<OPTION VALUE="null">
<OPTION VALUE="null">
</SELECT>

</FORM>

<input type="hidden" name="Email">
<input type="submit" value="submit">
</form>

Another question, is it possible to have the values that were selected in the drop down boxes (in the inner form) to be an input in the outer form?

Thanks,
Mindy

Is This A Good Question/Topic? 0
  • +

Replies To: Nested Forms Problem

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: Nested Forms Problem

Posted 09 August 2004 - 12:33 PM

Let's do this in reverse, tell us what you are trying to accomplish, and we can most likely assist you in coming up with the code, I can't tell exactly what you want to do, where the values need to be after submission, etc. etc. So if you give us a scenario, I'll let you know the best way to attack it.
Was This Post Helpful? 0
  • +
  • -

#3 mindytruitt  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 09-August 04

Re: Nested Forms Problem

Post icon  Posted 09 August 2004 - 12:52 PM

I am tring to develop a form that submits and sends the info to a database. I am also wanting to have drop down boxes that change on click. The selected values in the drop down box should be sent to the database.

That is the main idea I want to accomplish. I hope that helps to describe it.

Thanks
Was This Post Helpful? 0
  • +
  • -

#4 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: Nested Forms Problem

Posted 09 August 2004 - 01:38 PM

You can do 1 of 2 things... I prefer using the onclick/onchange(submit) method... when a drop down menu or form is filled out, it submits the form to itself and then populates the drop downs based on the values selected, the other option is to create a fairly elaborate javascript that will slowly eliminate choices as other choices are selected.

You should be able to put all the fields in 1 form, and then check if each field is defined, if it is, you can then populate the corresponding drop down menu based on the value using a query. Then when all the fields come in you can insert/update/delete accordingly.
Was This Post Helpful? 0
  • +
  • -

#5 mindytruitt  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 09-August 04

Re: Nested Forms Problem

Posted 10 August 2004 - 03:06 PM

Works Great :D

Thanks a Ton,
Mindy
Was This Post Helpful? 0
  • +
  • -

#6 shiroh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 23-December 04

Re: Nested Forms Problem

Posted 23 December 2004 - 01:23 PM

I know you found a solution to this already but you can also check out the custom tags TWOSELECTSRELATED and THREESELECTSRELATED (I'm not sure where to find them anymore but you can search the developers exchange on Macromedia.com for them). This solution would only work if your drop downs are in a database and the tables are somehow related so you can produce a query with the relevant information for populating the select lists. These tags are pretty useful if you don't want to have the screen refresh every time a user selects an option.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1