View Full Version : simple form help

02-03-2007, 12:55 AM

links to form with subject target


After this contact form subject text field get call target and put in subject field automatic visitor dont need to write if they want to put custom text in subject then only give link like this http://www.xxx.com/contact.htm but dont show any thing in subject field hope u understand and help me in this...sorry for ma bad english

02-03-2007, 04:14 AM
help me

02-03-2007, 05:28 AM
Is this some sort of ****ography site? No can do then.

02-03-2007, 05:51 PM
no...XXX its just example of website link...LOL

plz help me

02-03-2007, 08:50 PM
yeah... use www.example.com/webpagex or something, xxx.com is a real **** website...

02-04-2007, 04:16 AM
...and I'm under 18 so I can't enter.

Anyway, what do you want? I don't know what you mean.

02-04-2007, 04:23 AM
I think what the OP means is when you go to contact.htm, you get a contact form with a subject field for the user to type in. If you go to contact.htm?=Reports, the subject becomes Reports or something like that.

Well, my answer for this is you cannot do it with just HTML. You might be able to with Javascript (doubt it though, but you never know). You can; however, accomplish this with PHP. I currently don't have time to post the code for it, but the idea is simple. Have a variable (let's say $subject). See if it is set or not. If so, do not display subject field and use that as your subject in the mail. Else, display a field for the user to type into.

Hope this helps.

02-04-2007, 04:43 AM
<script type="text/javascript">
function getVar(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
return "";
var to = "theemailhere@example.com"
function mail() {

window.location="mailto:" + to + "?subject=" + getVar('subject')