Cookie question


#1

So I have a simple web site with w/o logins and server side stuff. Someone goes to one of the calculators and enters values. Those values are used in calculations and an area of the page displays the results.

So the second a visitor leaves everything is gone (reset). Is there a simple way I can push a cookie to their computer with the values they have entered?

I’m hoping that I can set it up so when they come back the page will auto populate with the last set of values they used.

An example of the calculation page can be found here

http://www.mypizzamaster.com/calculator.php

PS. I’m hoping that someone will point me to a big button I just press and it all happens, maybe in Wappler 1.5 if not available yet :smiley:


#2

Please check this https://www.dmxzone.com/go/32764/dmxzone-app-connect-manual/ its the same in Wappler. You can store all the form values in a cookies.


#3

Cookies work really great in AppConnect, have used them many times and they function exactly as they have to


#4

I though I was going to get it.

I added the cookie manager, defined some cookies, basically did everything in the video until it got to 2 min and 43 seconds.

I can’t seem to find the insert binding button (arrow in pict below)…


#5

Did you click inside the page, where you want to bind cookie data?


#6

I think I’m in the spot - but I have never done this before. This is where I am…


#7

Find the
Dynamic Attributes and hit + sign
then Input->Value
and bind the cookie value


#8

Thanks - I think I understood what you said - I just need to test - I’ve got a pile of these to do…

Hope I can move this to and includes file and reuse it on multiple pages once I get a set finished :smiley:

2018-10-10_12-06-35


#9

That does not seem to work - I must be doing something wrong or not doing a good job explaining what I’m trying to make happen…


#10

type anywhere inside your code {{cookies1.data.datemixed}} and see if it will display any value

*anywhere between body tags


#11

Nope, I don’t see anything anywhere - maybe it does not work with date-picker info…

But I don’t have any double braces in my code either.


#12

This is working great for a normal form field - just does not seem to work with a date from a date-picker (but I might have made a mistake with that one)…


#13

Just FYI, this worked once but I had to add a second dynamic action to update it after the first time through, is this expected?

2018-10-10_13-43-59


#14

well this depends on what you want to achieve and how your code is structured. If it worked then you are ok


#15

Thanks Nikolaos, yes it is working so that is perfect - I would have never figured it out if you did not help with that last step. I appreciate it very much :smiley:

I guess it is normal for it not to work with date-picker, or do you think I should file a bug report?


#16

Well truth is that I never had to use datepicker with cookie so I am not sure.