Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't add text field to from

Status
Not open for further replies.

stemy

Programmer
Aug 25, 2001
39
IL
Hi
I'm trying to edit a from that someone else did, that sends the input throught email (cdo). I've added a new text field to the from but when I submit the field is not included. should I bind it to the form in some way ?
Dror Givoli.
 
You will need to add the form variables into the cdo code.

Post the code for your cdo page and Form so we can have a look.

Cheech The secret of life is honesty and fair dealing. If you can fake that, you've got it made.
Groucho Marx (1895-1977)
 
I think the code was automatically generated, but it goes like this:
If FormFields <> &quot;&quot; Then
For Each item In arrFormFields
BodyString = BodyString & item & &quot;: &quot; & Request.Form(item) & chr(13)
Next
End If
objCDO.Body = BodyString

thanx
 
There will be a line in the code somewhere assigning the form fields to the variable used in this line.

If FormFields <> &quot;&quot; Then

post the whole page where the above code appears.

Cheech [Peace][Pipe]
The secret of life is honesty and fair dealing. If you can fake that, you've got it made.
Groucho Marx (1895-1977)
 
thanks!

I found the line and went like

FormFields = fname~lname~number~ (etc.)
arrFormFields = Split(FormFields.&quot;~&quot;)

so I just added my new field to the long concatenated string.
Isn't dreamweaver supposed to do that automatically ??

 
If DW built the function it would normally update it. Sometimes you have to open the behaviour to add the aditional fields though.

If you have a page with an Insert/Update record behaviour attached all set up and working. Then added a new form field to the page you would have to add the new form element to the Insert/Update behaviour, otherwise dw doesn't know what you want to do with the contents.

Hope that explains it a bit.

Cheech [Peace][Pipe]
The secret of life is honesty and fair dealing. If you can fake that, you've got it made.
Groucho Marx (1895-1977)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top