Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Auto-insert text into HTML form

Posted by: Oriiumtech May 30 2012, 10:54 AM

Hello all

Apologies if this is in the wrong section. New to the site and still finding my way around.

My employer has tasked me with creating a feedback form for our web-based customer ticket system. The form is HTML based with some basic PHP scripting involved which just emails the details back to us. For the most part it's working fine however I'm having a bit of trouble with one of the requests though.

Basically when the customer clicks on the link to take them to the form my boss wants the ticket number to be auto-filled into the field "Ticket Number". Ideally this wants to be done from the link so for example:

http://www.mycompany/form.html&ticket=12345 would open the site with 12345 already in the ticket number field. (Our ticket system can autocreate the link with the relevant ticket number).

The above example does not work - guessing the "& . . ." can only be used on php pages? Not sure - only just getting into the whole development side of websites, still a newbie. tongue.gif I'm more of a designer than developer so although I can get the basics in place I do struggle with the coding. Wondered if anyone knew how to do this and/or could point me to a guide that can explain where I'm going wrong?

Many thanks in advance.

Andy

Posted by: Christian J May 30 2012, 03:08 PM

QUOTE(Oriiumtech @ May 30 2012, 05:54 PM) *

http://www.mycompany/form.html&ticket=12345 would open the site with 12345 already in the ticket number field. (Our ticket system can autocreate the link with the relevant ticket number).

The above example does not work - guessing the "& . . ." can only be used on php pages?

Try this instead:

CODE
http://www.mycompany/form.html?ticket=12345

See also http://www.php.net/manual/en/tutorial.forms.php (with a querystring, like in your case, you may use GET instead of POST).




Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)