The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Auto-insert text into HTML form, Help required inserting text automatically into website form
Oriiumtech
post May 30 2012, 10:54 AM
Post #1





Group: Members
Posts: 1
Joined: 30-May 12
Member No.: 17,194



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post May 30 2012, 03:08 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



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).



User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 07:32 PM