passing data between forms

Issues related to forms.
Post Reply
va3ts
 
 
Posts: 53
Joined: Sun Oct 20, 2013 11:51 pm

passing data between forms

Post 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
User avatar
Pablo
 
Posts: 21575
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: passing data between forms

Post 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.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: passing data between forms

Post 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
va3ts
 
 
Posts: 53
Joined: Sun Oct 20, 2013 11:51 pm

Re: passing data between forms

Post by va3ts »

I placed the editboxes on the paypage as suggested, but the actual data only appears if I doubleclick the editbox ....
User avatar
Pablo
 
Posts: 21575
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: passing data between forms

Post by Pablo »

You will need to make sure the IDs of input fields are the same.
va3ts
 
 
Posts: 53
Joined: Sun Oct 20, 2013 11:51 pm

Re: passing data between forms

Post 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)
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: passing data between forms

Post 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.
va3ts
 
 
Posts: 53
Joined: Sun Oct 20, 2013 11:51 pm

Re: passing data between forms

Post by va3ts »

Changed that, works now, thanks...an unrelated question... is it of any use to bother with 320px breakpoints.
MGD4me
 
 
Posts: 287
Joined: Tue May 02, 2017 11:56 pm
Location: British Columbia, Canada

Re: passing data between forms

Post 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.
User avatar
BaconFries
 
 
Posts: 5327
Joined: Thu Aug 16, 2007 7:32 pm

Re: passing data between forms

Post 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
va3ts
 
 
Posts: 53
Joined: Sun Oct 20, 2013 11:51 pm

Re: passing data between forms

Post 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
Post Reply