Page 1 of 1
passing data between forms
Posted: Thu Mar 04, 2021 6:02 pm
by va3ts
I have a simple club membership form which determines some options as it relates to our club membership
https://gbarc.ca/testpage.php
This page gathers up some personal information and I would like to transfer some of it to this page, which is the paypal page
https://gbarc.ca/paypage.php
I thought that web storage might be good for this but how do I get the stored information and place it in the paypage form?
thanks Tom
Re: passing data between forms
Posted: Thu Mar 04, 2021 6:30 pm
by Pablo
With webstorage, you will need to add the same fields (but hidden) on the second form so they are include in the submitted data.
Re: passing data between forms
Posted: Thu Mar 04, 2021 6:51 pm
by WWBman
Or if you want to show the data on the second page then make the IDs the same in both pages and just use normal editboxes.
E.g. in testpage have an editbox with ID = Editbox1
in paypage have an editbox also with ID = Editbox1
Re: passing data between forms
Posted: Mon Mar 08, 2021 12:05 am
by va3ts
I placed the editboxes on the paypage as suggested, but the actual data only appears if I doubleclick the editbox ....
Re: passing data between forms
Posted: Mon Mar 08, 2021 7:03 am
by Pablo
You will need to make sure the IDs of input fields are the same.
Re: passing data between forms
Posted: Mon Mar 08, 2021 2:49 pm
by va3ts
What didn't work yesterday, works today. the only difference is that I shut down the computer last night before bed, this morning, a startup, checked the editbox ID's as you suggested and now it works. It appears the computer itself is not in a predictable state. I have in the past, looked for some method to clear any variables that a page is using on its exit, for example, when the person clicks the button to donate and send the user to the paypal site...but I have not been able to find what I need. It may be some browser security feature, but users to the page will have the same issues I have. Perhaps you know of a method to clear the form variables on exit (editboxes etc)
Re: passing data between forms
Posted: Mon Mar 08, 2021 3:14 pm
by WWBman
Did you use Local Storage?
Local Storage will be retained even after closing the browser.
If you use Session Storage instead then it will be cleared when the browser is closed.
Re: passing data between forms
Posted: Tue Mar 09, 2021 5:10 pm
by va3ts
Changed that, works now, thanks...an unrelated question... is it of any use to bother with 320px breakpoints.
Re: passing data between forms
Posted: Tue Mar 09, 2021 7:20 pm
by MGD4me
is it of any use to bother with 320px breakpoints.
I still do, for now.
But, I accept the fact that some web pages are going to be less an ideal in appearance. Given that 'perhaps' (a guess) only about 1% of those older phones might still be use today, that's okay with me. Remember that those users can still rotate their phones to Landscape mode, and view the next viewport size quite well, eg at 480px.
Re: passing data between forms
Posted: Tue Mar 09, 2021 7:50 pm
by BaconFries
is it of any use to bother with 320px breakpoints
Perhaps the following will be of use to help you.
https://gs.statcounter.com/screen-resol ... /worldwide
Re: passing data between forms
Posted: Wed Mar 10, 2021 6:43 pm
by va3ts
The site has been using 1280, 1024,480 and 320. I've been thinking of going 1280. 1024, 720 and 480. I've also noticed that some devices are more difficult than others to have a nice looking layout. A samsung phone I have looks ok, but an android tablet i have is a lost cause. But the wifes ipad is good. thanks