OS Property support center

SOLVED !!! Advanced search form variable

  • Jim
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
9 years 11 months ago - 9 years 11 months ago #63908 by Jim
I am trying to add some custom text to the advanced search form depending on country selection.

example, the user selects Spain, and when the search results come back and the page reloaded it will show text related to spain.

i.e. if($country == 169){ echo "Spain info";}

my question is what is the $country variable returned after the results, there must be one as after the page is re-loaded the country dropdown field is pre-populated with Spain

any help would be appreciated
thanks
Jim
Last edit: 9 years 11 months ago by Mr. Dam.

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #63972 by Mr. Dam
Replied by Mr. Dam on topic Advanced search form variable
Hi Jim,
The country variable of Advanced Search form is: country_id
Thanks
Dam
The following user(s) said Thank You: Jim

Please Log in or Create an account to join the conversation.

  • Jim
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
9 years 11 months ago #64057 by Jim
Replied by Jim on topic Advanced search form variable
Hi Dam,

I have tried this but it doesn't return anything.

I have tried echo $row->country_name & echo $country_id

Can you help? I just want to return the country id in the results after the page loaded/reloaded

Thanks
JIm

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #64066 by Mr. Dam
Replied by Mr. Dam on topic Advanced search form variable
Hi Jim,
You can try this
$country_id = JRequest::getInt('country_id');
if($country_id == XXX){
}

Good luck
Dam
The following user(s) said Thank You: Jim

Please Log in or Create an account to join the conversation.

  • Jim
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
9 years 11 months ago #64103 by Jim
Replied by Jim on topic Advanced search form variable
Perfect Dam,
Many thanks
Jim

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan