I know how to code a contact form into a page. I am also comfortable with writing the .php document to action the email to be sent from the form. However, my knowledge is basic. The fields I have used are Name, Email, Message and Subject. I would like to develop this into something quite a bit more advanced. Does anyone have any input to assist with these enhancements?
1. The company sells products that are advertised online. Each product has a unique code (e.g. A092). Next to each product is a link titled "more info". I would like this link to open up a contact form that holds the product's unique code in the subject line. Obviously I can code a seperate form for each product that goes onto the site, but that is really a slow way around. Is it possible to automate the code so that the form will automatically determine which product the user has linked from and insert that code into the subject line?
2. I want to create an Purchase Order Form. Just like the standard contact form, the name, email and message fields will be used. However, the subject will obviously be standard - Purchase Order. I would like to add additional fields to the form though and I am not sure how to write the .php file to incorporate all the additional fields. Would I use the "headers" element? If so, how would I do so? The link to this form would come from a specific product so, again I would want to unique code to be incorporated somewhere. One of these additional fields would be a radio button confirming that the user has read the Terms and Conditions so that would need to come up as well. This form would then need to be emailed to me as with the others.
3. The last enhancement would be to create a form with which the user can advertise his/her own product on the site. This form would be a contact form with various additional fields. However, the main issue here is that I would like the form to have the capacity for the user to attach images of their product.
I think that the solution to all three questions is probably along the same lines - the variables on the .php page, but I am not sure If there is more to it...
Advanced Contact Forms
Moderator: General Moderators