Jump to content

URL redirect from form entry


Recommended Posts

Hi guys, I know the basics of HTML but I've come to you for some help, hopefully.

 

Here's what I'm trying to achieve...

 

I want to create a landing page for my company that contains a simple form entry.

 

"Enter your town" ......... > (Hit Submit).....> Redirects to one of two URL's depending on what they've entered.

i.e. IF contains "Exeter" redirect to *URL1*

IF DOES NOT contain "Exeter" redirect to *URL2*

 

 

Is anyone able to write me a full code, form and all?

Link to post
Share on other sites

Plenty of people here could write it for you, but instead we're going to help you write it.

 

Are you going to do this using PHP or Javascript? You'll need one or the other because HTML and CSS alone can't do it.

 

 

But, actually, requiring people to type in their town isn't very nice. If you want to learn how to do this in principle that's one thing, but if you want to put this up with your company's site for real then we should talk about other options.

Link to post
Share on other sites

I'm going to need a lot of help in that case. When I say I know the basics, I mean the bare basics.

I don't know the difference between PHP and javascript. I just want to input a HTML code onto my WIX site. 

Trying to get this set up before tomorrow.

 

I chose for people to input their town, as providing a drop down would be lengthy, boring and consist of around 50+ towns.

We're trying to filter out people who have Franchises in their areas, the rest will be redirected to our online store where we post across the nation.

Thanks

Link to post
Share on other sites

What about the people who have a franchise nearby but want to order from the online store?

 

The standard way to approach this problem is to give them to option to find nearby stores. Don't require them to do it at any point as it's more likely to frustrate users.

You should give them the online store by default, then make it easy for them to find a nearby store. You can then add support for geolocation which will assist with the latter by automatically determining where the user is - if the user('s browser) allows it.

 

For example, Sainsbury's has a "Store locator" link at the top which takes you to a map where you can find stores automatically (⦿ button) or search for one normally.

 

What do you think? It's more work but I think it's better for the user as it's more consistent with other sites.

Link to post
Share on other sites

It does sound good and I get where you're coming from. 

We're an evening delivery service and each franchise has it's own facebook page. It's primarily facebook based and orders are taken through there too.

The idea is to create a landing page that will get people to the relevant facebook pages (as there are quite a few now).

 

Your way seems simpler. I'd have to check it over with the boss man.

Link to post
Share on other sites

It'd be really nice if your site could take orders for franchises too... Like, if that were possible, then you could allow the online ordering as normal, then when they enter their address you can locate nearby franchises and give the user the option to order from them directly.

 

I feel bad for diverting you from entering a city to using geolocation - it's more complicated than I think you or your boss was expecting. So,

 

Simpler than the geolocating stuff would be to present a map to users showing all your franchises with links to, well, wherever the franchise prefers (like their Facebook page). Using just the IP address you can generally narrow down their location to a city or shire and then automatically put the map at that location, so there's no "site wants to access your location" message from the browser (which, for desktop users, probably wouldn't be much more accurate than with an IP address anyways). I don't know any examples of this off the top of my head, but I know they exist. Again, the idea is that the user can be on your site without any intrusions but can find nearby locations easily enough.

Link to post
Share on other sites
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.