Passing Data to Index page through URL

Hi all, I have an index page and I’m trying to pass some data to it (ID number in this case). The index page https://testament.ink looks like this:

What I want to do is be able to pass the ID number through URL and import it into the ID input field. Like this: https://testament.ink/988932
Unfortunately, when I do just that, bubble.io thinks it’s a page and I get a 404 error message.

If, however I use the full path: https://testament.ink/index/988932 then it works like a charm.

I’m using “path” type, I do not wish to use “paramaters” as it’s not pleasing to the eye.

So, to reiterate what I want is to be able to send someone a linke like this: https://testament.ink/xxxx and upon clicking on it they will be taken to the home page and the ID placeholder will be filled with xxxx.

I thank you in advance.

Try using arbitrary text.

Demo:

Editor:

It doesn’t really solve my problem as you’re passing the data to a second page which is not the index page. The problem I’m facing (I think) is that Bubble thinks that what comes after the " / " is supposed to be a page and it can’t find it. If I type in Testament then it works, when I omit ‘index’ it doesn’t

That simply does not work in Bubble because / is the homepage and /something is the page named “something”. So the xxxx needs to be a querystring parameter.

One solution that may or may not be to your liking is that you CAN have a page (that’s not your index page) that takes a parameter without the ?. For a very very very very long explication of this (and lots of dumb comments from folks in the peanut gallery), see:

But let me stress: There’s nothing wrong with testament.ink?xxxx… I mean, are you SPEAKING this URL to people? Somehow I doubt it… BUT… If you ARE (i.e., there’s only a limited set of these redirects) you can manually create a redirect in your app for /xxxx, but there’s no programmatic way of doing this at runtime. It takes your intervention on the development side. (It’s exactly analogous to if you have some sort of static site and now you say, "OK, I want www.whatever.com/podcast redirect to www.whatever.com/?source=podcast. You simply redirect /podcast and forego ever having a real page at route /podcast. I’m not sure why Bubblers get so hung up on dumb stuff like this. I guess because in the early going, they are not yet web developers.)

Usually this complaint comes up when people want LinkedIn style usernames/ids (where, linkedin.com/myname resolves to the user’s profile page). The reason you can’t have this particular nice thing is that you don’t have programmatic control over your server (or I guess more your custom “routes”) in Bubble (because you’re sharing a server with other folks) . But do note that not every site enables that. For example, Reddit user pages are under /u/ and nobody seems to mind (in fact, it’s widely understood that a user’s Reddit profile will be under /u/username).

1 Like

Ah, ya I misread your post.

I echo Keith’s answers

1 Like

Ok, now I understand. If it can’t be done it can’t be done. Thanks a lot Keith, I appreciate the lengthy information

This topic was automatically closed after 70 days. New replies are no longer allowed.