We help IT Professionals succeed at work.
Get Started

PHP Form jQuery On Submit

Robert Granlund
on
1,076 Views
Last Modified: 2015-03-07
I am using a CMS called expression engine.  It develops it's own forms. Here is an example:

Code on page:
		{exp:cartthrob:add_to_cart_form
			id="mail_info"
			return="{template_group}/view_cart/"
			class='form-horizontal'
			entry_id="{entry_id}"
			no_tax="yes"
			no_shipping="yes"
			allow_user_price="yes"
			subscription_plan_id="1"
			}

Open in new window

Rendered Code:
<form id="mail_info" class="form-horizontal" action="/store/29" method="post" novalidate="novalidate" data-dpmaxz-eid="5">
<div class="hiddenFields">
<input type="hidden" value="114" name="ACT">
<input type="hidden" value="/index.php?/store/29" name="RET">
<input type="hidden" value="store/29" name="URI">
<input type="hidden" value="cb8e5b489f04be74fa74fffd727bd3cc" name="FRM">
<input type="hidden" value="store/view_cart/" name="return">
<input type="hidden" value="29" name="entry_id">
<input type="hidden" value="1TUIrKaILcaDYniewO0IBTcJsIWMvvaCKUZ4v5FsktNPg5zuqRta0+jClTDZoOAAtIkC2tc8P3AfFmqHjFdRfw==" name="AUP">
<input type="hidden" value="Jbhbdxnq/FizDDKf2T4yE6UZSw+xI5PCXBU3Dq+xUpyRdJ34GFuvQ5SeZEK84Vo7FEN1rsjDXHyzJ2OffGLSHA==" name="PI">
<input type="hidden" value="zpCPzmYfcYKrYN8huytyAgrKn04XpV72F13VzSDmwASqT9pxgH86rov+G7CSoa2YRopSQ2aY17GTDIU+6S1AHA==" name="AUW">
<input type="hidden" value="lfd4zh3RnxIhUBgib91dWdCmt3P0i8WRGeugdX1Mu+RR4I90+6J6Wfe4PeAxNgBI2F7WwVLcUoPoJr+NZNoItQ==" name="AUS">
<input type="hidden" value="eDgkkhR2caGm12HPR6POb6Dnq9PPDExaC1KnqsbmZKZpWOYt4KkTwWufkssvvepxc+KOEYTvvTZHRNA21yE7Iw==" name="OTF">
<input type="hidden" value="x9Rqg04BU4ponuwaKCMO95uJ5b6EwMufrh1bIfyjVLO00yIc9CHy1EtxmbJSs3QMeHTzP2tXVxtInsSOSRkAMw==" name="LIC">
<input type="hidden" value="c1j9ElkgUYEaOgsfAPM4WtY+K3vOdpZRIlwVH8cmzpMps/fUs13GcxxHXuQa5nh26hBazm/BHWF/NHeICeumBQ==" name="ERR">
<input type="hidden" value="2OxVyDYECXRK9c8lGl28/txIP6bxOnnX6749e9c6cRA/NnQN64OLuGx238TapS4a9TcPKPKTFkQ4VM+qIM4HBw==" name="RLS">
<input type="hidden" value="gMvGLJBMCcu3+beqzZNiImLfvZz7/816S40iJyvlAY8To3Rcvbp3teVwvH0m2RC6IRk22RDGs8HfSrnBYWjutA==" name="NTX">
<input type="hidden" value="P2Jrax61K8ywG+0wbcTHGbrJrEm+nD4hbuLFJGfL/nwSvahwjaTiHu5Gg9wO2czxBASe2zMrgEldmZU9D2uBOg==" name="NSH">
<input type="hidden" value="1" name="site_id">
<input type="hidden" value="afc94b8d0c7f521209fd20dc71cb67b1e68cdd86" name="csrf_token">

Open in new window


The code on the page returns to the new page when the form is processed.  However, I need to send an email with all of the form inputs.  I cannot seem to figure out a way to do a if(isset($_POST['mail_info'] when it gets to the next page.  It is like the form was never sent.  The action is on the same page as the form but that does not seem to work either.

Is there a way to do it with jQuery / Javascript?
Comment
Watch Question
Consultant
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE