Page 1 of 1

Passing a title from page 1 to a form field

Posted: Mon Sep 08, 2003 10:15 am
by Chaal
Hi,

Just found this site. It's great :)

I am somewhat a newb here so please be gentle with me :)

I have a page that shows vacancies, now what I would like to do is be able to click a link to the online application form, but when I do that it takes the job title and puts it in the correct form field on the online application form.

Is this easy ti do?

I don't need it going to a database or anything.

Thanking you
Chaal

Posted: Mon Sep 08, 2003 11:07 am
by m3rajk
have you used forms before?

Posted: Mon Sep 08, 2003 11:24 am
by JayBird
make this the link to your application form

Code: Select all

<a href="somefile.php?title=someJobTitle>Apply Online</a>
Then on the page with your form, in the text field

Code: Select all

<input type="text" name="jobTitle" value="<? echo $_GET['title'] ?>">
Shoudl work a treat

Mark

Posted: Mon Sep 08, 2003 11:57 am
by Chaal
Hey thanks for that.

I will give it a try :)

By the way can this be used with more than 1 form field?

All the best
Chaal

Posted: Mon Sep 08, 2003 12:03 pm
by JayBird
Chaal wrote: By the way can this be used with more than 1 form field?
You sure can!

Have a bash with the example i gave you, then if you have any more problems, just post here an we will try and help ya out.

Mark

Posted: Mon Sep 08, 2003 12:16 pm
by Chaal
So on the page I would put something like:

Code: Select all

<a href="somefile.php?title=someJobTitle&ref=somereference>Apply Online</a>
Thanks a bunch for the guidance :)

Posted: Mon Sep 08, 2003 1:08 pm
by JayBird
yup, you got it ;)

Posted: Mon Sep 08, 2003 1:20 pm
by Chaal
Cool,

Thanks for your help :)

Posted: Mon Sep 08, 2003 2:02 pm
by JayBird
no problem mate.

You may also wanna read this http://www.devnetwork.net/forums/viewtopic.php?t=511

Mark

Posted: Mon Sep 08, 2003 4:22 pm
by Chaal
Hi there,

I think I have run into a problem with the reference number idea. If this is manually entered on the first page say, ref:2003 I am not sure how I would actually pull that into the form as its not gonna be found using:

Code: Select all

<a href="somefile.php?title=someJobTitle&ref=somereference>Apply Online</a>
I guess I would need to wrap the reference in a tag of some sort.

Not 100% sure here.

Thanks