![]() ![]() |
| Fakshon |
Nov 3 2009, 10:34 PM
Post
#1
|
|
Group: Members Posts: 3 Joined: 3-November 09 Member No.: 10,224 |
Hi,
I am trying to develop a form that does this: List one chooses a City (variable 1): Austin = 214 (term ID) Los Angeles = 215 (term ID) Chicago = 216 (term ID) List two chooses a type of restaurant (variable 2): Tex-Mex = ,415 (term ID) Italian = ,416 (term ID) American = ,417 (term ID) Which will complete a url www.examplesite.com/taxonomy/term/(variable 1),(variable 2) Then a form Submit Button that will: Click the link to the dynamic link that was created by the form. Which will cause the page to go to: www.examplesite.com/taxonomy/term/214,415 I hope this is understandable. Thanks, Fakshon |
| Darin McGrew |
Nov 3 2009, 10:59 PM
Post
#2
|
|
WDG Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 5,144 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
HTML forms don't work that way, but you could have a server-side (e.g., CGI, PHP) or client-side (JavaScript) program redirect to the desired URL.
-------------------- Darin McGrew
WDG Member since 1998 My involvement with the WDG is personal. The views I express here are mine alone and not those of my employer. |
| Fakshon |
Nov 4 2009, 09:13 PM
Post
#3
|
|
Group: Members Posts: 3 Joined: 3-November 09 Member No.: 10,224 |
I am currently using Drupal to develop my site which uses PHP. I myself don't know enough about PHP but I am in need of creating this function. Any help would be greatly appreciated.
Thanks, Tone |
| Christian J |
Nov 5 2009, 08:41 AM
Post
#4
|
|
¤¤¤¤¤¤¤¤¤ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 2,371 Joined: 10-August 06 Member No.: 7 |
Which will cause the page to go to: www.examplesite.com/taxonomy/term/214,415 Normally, submitted form fields (with submit method GET) create a URL with the name/value pairs of the form fields, not just the values like in your example above. To change it you may have to use e.g. PHP like Darin suggested. |
| Brian Chandler |
Nov 5 2009, 10:29 AM
Post
#5
|
|
Jocular coder ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,431 Joined: 31-August 06 Member No.: 43 |
QUOTE www.examplesite.com/taxonomy/term/(variable 1),(variable 2) Is this destination page under your control? If so, it would be much more sensible to let it accept arguments in the conventional format generated by a form (as Christian said). Where are these numbers ("214=Chinese cooking" or whatever it was) coming from?? |
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st November 2009 - 10:37 AM |