You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 29-08-2013 15:57:22

yellowcircleweb
Contributors
Registered: 28-07-2013
Posts: 26

Posting form variables from one page to another

I have a page where a user fills out a form, the values of the form are then posted to an email script on another page. If I remove the pages from the Metro UI URL structure e.g. if I just set the action on the form that posts to be something like action="pages/confirm.php" then the values entered into the form are picked up on the confirm.php page and an email is sent using them.

However, when I adhere to the URL structure of the framework and have the form action as action="#!confirmation" (confirmation is the label I have set up in config/pages.php) then confirmation page loads in the framework, but none of the previous page form information is picked up. The only thing I have changed in the page is the form action, the code that sends the email hasn't been touched at all.

Can anyone help with this please?

Offline

#2 29-08-2013 17:18:15

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: Posting form variables from one page to another

That's the tradeoff for having the page transitions. It loads by ajax. I'll try to put a package that enables you to have "normal" pages without transitions so it works. But I recommend to check out the contact form that's somewhere on the forum here and check how that works smile

Offline

#3 29-08-2013 17:27:40

yellowcircleweb
Contributors
Registered: 28-07-2013
Posts: 26

Re: Posting form variables from one page to another

It would be great if you could work something out for normal page posting as we are marrying your excellent framework up with other web design software we use to make a data be driven ordering system. I had a look at the way the contact form works. If we have to use the Ajax method would we have to create separate pages in the Ajax folder and assign the posted variables in there? We are also using a shopping cart system to hold order details, that uses the post method too to populate variables used in an email to produce an order confirmation

Offline

#4 29-08-2013 17:30:27

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: Posting form variables from one page to another

Offline

#5 29-08-2013 17:49:32

yellowcircleweb
Contributors
Registered: 28-07-2013
Posts: 26

Re: Posting form variables from one page to another

Wow that was fast. Thanks very much. I will try it out tomorrow at work. Much appreciated.

Offline

#6 02-09-2013 20:36:05

yellowcircleweb
Contributors
Registered: 28-07-2013
Posts: 26

Re: Posting form variables from one page to another

Hi again,

Just wanted to let you (Thomas - and everyone else) know that the static page package works. I can now pass variables from one page to the next as normal and the ordering system I am building now works too.

However, it's not responsive on mobile. Will this be something to do with the framework package or should I re-code the forms/tables used in the ordering system to use the forms/tables built into the framework in order to have them format correctly on mobile?

Thanks in advance

Offline

#7 02-09-2013 22:29:40

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: Posting form variables from one page to another

Do you mean that the template is not responsive or that the ordering system you use is not responsive? Probably, the ordering system's tables have some fixed width or min-width set, which makes it impossible to make the table smaller. You should check that with Google Chrome's Element Inspector (or Firebug) and counter it by adding CSS.

Offline

#8 03-09-2013 09:42:14

yellowcircleweb
Contributors
Registered: 28-07-2013
Posts: 26

Re: Posting form variables from one page to another

Yeah - I'm pretty sure it's the basket software not being responsive. I'll create new CSS as you suggested.

Offline

#9 03-09-2013 12:41:46

yellowcircleweb
Contributors
Registered: 28-07-2013
Posts: 26

Re: Posting form variables from one page to another

I've had a play around with the css on the basket page and it's not responsive even when I include new media queries when I use a static page. Is this because it's not including mobile.php in the URL so the mobile code isn't executing do you think?

I can see on the static pages that there is no link at the bottom of the page to view the full version of the site, meaning it's just using the desktop version of a page. How can I get static pages to include the code in mobile.php too?

**update **
I got some css code firing on mobile devices only - so that's working. It's the template itself that's not responsive. I have reduced the width of the sample basket on mobiles to 50% but the overall page width is still the same as on the desktop version and the mobile version of the main nav menu isn't displaying, its the version from the desktop.

The static_example.php page included with the package isn't responsive either!

Last edited by yellowcircleweb (03-09-2013 18:36:22)

Offline

#10 20-01-2014 09:59:19

askomp
Member
Registered: 20-01-2014
Posts: 1

Re: Posting form variables from one page to another

The provided link is not working anymore. I would like get my normal pages without ajax forms working too.

Last edited by askomp (20-01-2014 10:18:41)

Offline

#11 20-01-2014 10:25:20

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: Posting form variables from one page to another

Only works for "donators" accounts. Sorry hmm

Offline

Board footer

Powered by FluxBB