passing data between forms

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

passing data between forms

Post by va3ts » Thu Mar 04, 2021 6:02 pm

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: 23391
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: passing data between forms

Post by Pablo » Thu Mar 04, 2021 6:30 pm

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: 951
Joined: Fri Jan 08, 2010 6:10 pm

Re: passing data between forms

Post by WWBman » Thu Mar 04, 2021 6:51 pm

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: 28
Joined: Sun Oct 20, 2013 11:51 pm

Re: passing data between forms

Post by va3ts » Mon Mar 08, 2021 12:05 am

I placed the editboxes on the paypage as suggested, but the actual data only appears if I doubleclick the editbox ....

User avatar
Pablo
 
Posts: 23391
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: passing data between forms

Post by Pablo » Mon Mar 08, 2021 7:03 am

You will need to make sure the IDs of input fields are the same.

va3ts
 
 
Posts: 28
Joined: Sun Oct 20, 2013 11:51 pm

Re: passing data between forms

Post by va3ts » Mon Mar 08, 2021 2:49 pm

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: 951
Joined: Fri Jan 08, 2010 6:10 pm

Re: passing data between forms

Post by WWBman » Mon Mar 08, 2021 3:14 pm

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: 28
Joined: Sun Oct 20, 2013 11:51 pm

Re: passing data between forms

Post by va3ts » Tue Mar 09, 2021 5:10 pm

Changed that, works now, thanks...an unrelated question... is it of any use to bother with 320px breakpoints.

MGD4me
 
 
Posts: 225
Joined: Tue May 02, 2017 11:56 pm
Location: BC, Canada

Re: passing data between forms

Post by MGD4me » Tue Mar 09, 2021 7:20 pm

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: 5330
Joined: Thu Aug 16, 2007 7:32 pm

Re: passing data between forms

Post by BaconFries » Tue Mar 09, 2021 7:50 pm

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: 28
Joined: Sun Oct 20, 2013 11:51 pm

Re: passing data between forms

Post by va3ts » Wed Mar 10, 2021 6:43 pm

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