Dreamweaver - How to define form action?
MRae825
Status: Interested
Joined: 04 Aug 2005
Posts: 16
Reply Quote
First off, I apologize if this is in the incorrect category - I didn't want to post in the HTML section so I thought this general area was more appropriate.

I am a newbie to web design and joined the forums hoping for some advice. What probably seems so simple to the majority of you is brand new to me. I thank you for your patience and hope to return the favor by answering questions for others later.

Anyway, because I was such a newbie, I used Yahoo! Sitebuilder (yes, I know - not the best program out there :) ) I have since started working with Dreamweaver and am re-creating my site. I have figured out how to create forms, etc. My problem is how do I define an action in the form?

For example, in my contact us page, if I want an email to come to me with comments/question - what do I need to do? Also, how do I correctly define the confirmation page after hitting the "submit" button.

So mainly needing to know - how do I get the info. to my inbox and how do I notify the visitor their submission has been received.

Thank you in advance!
Back to top
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
Welcome to the forums, MRae825. Normally this would be an HTML type question, but in this case it's a broader topic, since it actually deals more with hosting on yahoo using yahoo sitebuilder, which doesn't have much to do with HTML.

If you're using yahoo site builder, the form is probably submitting to a yahoo component that is out of your control, so the 'action' link can't be changed.

The normal way to do this is to have the form submit to another page on your website, which would be some type of scripted page, which would then send you the email.

However, with yahoo, it's not like that, in that case, you're submitting to a sort of master page that runs all the sites hosted by that part of yahoo, you have no control over that at all, and can't change any part of the parameters sent.

Normally, the action would look something like this:

:: Code ::
<form method="post" action="/site/process-email.html">
<rest of form.....>
</form>

However you don't have that functionality, I don't know enough about yahoo hosting to know if they even would let you run scripted pages on your server or not.

This is what say a yahoo hosted site builder site's form would look like:

:: Code ::
// examplified yahoo contact form
<form name="form0" method="POST" action="http://us.1.d4.webhosting.yahoo.com/forms?login=<your-yahoo-account> [linebreak added]
&to=<your-yahoo-username>&confirm=confirmationinquiry.html&error=error.html">


As you can see, the server is the general yahoo site server, and you are passing it parameters [everything after the ? is a query string parameter, and each item is separated by a &]. It takes these parameters and uses them to process the page.

Every form on your site that uses this syntax is sending its data to something outside of your control completely.

So in answer to your question, you'd need to copy exactly what is in each page's form action into the action field of the new pages you're making.
Back to top
MRae825
Status: Interested
Joined: 04 Aug 2005
Posts: 16
Reply Quote
Thank you! That was a very informative post and my understanding is much clearier now. I realize that now I will have to copy the exact coding from my previous page. Thank you for taking the time to reply. I appreciate the response and the enlightening information. I am sure I will popping in with more! Thanks again.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours