Is there an easy way to pull form data in from a URL (and create the custom URL in Wappler)

I hope I explain this good enough for someone to understand. Here goes… What I’m very interested in doing is figuring out if it is possible to automatically create a custom URL so that when it is clicked a user will go to my site and all of the form data for the form will be pulled in from the custom URL.

An example of this would be my pizza dough sauce and cheese calculator site. When a user creates a dough recipe they are filling in the fields on the page and then Wappler does the computations based on their input values.

What I would like to do is have a button on the calculator page that would send an email with a custom URL that not only gets someone to the calculator if they click on it, but also the custom URL would contain the form data so the same recipe would show up (be calculated).

Example below - this is a calculator page filled out - is it possible to have Wappler somehow import the form field values via the URL so the same recipe would show up?

If this could be done it would be the most awesome, coolest thing ever!!!

Are all your recipes stored in a database? If so it would be fairly easy to do. If not, I don’t see a way to do that as it would have to pull the data to fill the fields from somewhere.

No I still have not done the database part - it just seems like so much to figure out with so many steps - the form data is stored in cookies (in the cookie manager) so wondering if they could somehow be used?

Cookies are stored locally on the users computer. Therefore they would not be passed on to the new user.

Yes, but they must also be in the cookie manager since that is how they get xfered to the users computer. I don’t know if they can be pulled from there. I guess I could make the database, that part does not seem impossible to me. It is the sign in, passwords and all the redirects and user pages for separate people has kept me from messing with it.

How do you see it happening if I set up a database to hold the form values?

In . your DB you would have a unique field that is incremented with every record. Say you have a field named ‘recipeID’. You could then generate a URL like{{recipeID}}

Yes, but the mechanics of stuffing the number into a URL and than having Wappler use it to fill in the forms is the part I have no idea about.

You could pass the parameters as url($_GET) parameters I.e.
Where the parameters are dynamically generated from the "donor’ site and passed to the other site.

Was just about to suggest the same - have a form without action and method get! That’s all! After submit url can be copied

Are you guys trying to make me feel like a turkey on Thanksgiving :smiley:

I have been messing with all of this stuff for almost 2 months and sometimes (not often) I feel like I’m making progress. But after lots of Googling I can’t not figure out what you are both saying.

I’m not going swimming today 'cause sharks like a turkey dinner too…

Please have mercy and help me a little more :slight_smile:

Tell us in detail what you want to do and we can make suggestions.

I want to grab all the form values from a page and save them as part of a URL. Then later, if I click on that URL I want to go back to the page and use the values in the URL to pre-fill the web form.

The ideal configuration would be to have a button on the page that when clicked would create the URL and send it to a specified email address.

If that is possible?

Any ideas? - or is this not possible?

Hi Norm,
You already got a few suggestions above.

There’s no one click solution Integrated in Wappler especially for your specific case.
You need to choose the best method that fits your workflow/idea.

I did not understand them ;-(

I am afraid there is no other option. What I can suggest is the database method - i.e store the values in your database table, then use the unique ID in an url parameter, to call them by filtering the database table using this ID.

OK, thanks… I try to figure something out that I can do that is in my ability!!!

If I understand correctly, a part of what @norcoscia is trying to achieve is that if there are $_GET parameters in the URL, how to use those key-value pairs & show them on a field on page load.
I was trying this but could not do it. The browser component does have a load event, but there is no option to fetch a $_GET variable.

Found it.

@norcoscia This is how you can set parameters which will be in the url.
Then, set the Dynamic Attribute > Value for the text box as one of the query parameters.

1 Like

Thanks so much Nishkarsh - I had given up on that - I’ll try it out today and see if I can get it to do what I want. I appreciate the help!!!