HTML Form Basics for PayPal Payments Standard custom fields - forms

I'm trying to put a PayPal form on my website but I would also like to put custom fields on it.
I mean, I would like to receive the details that maybe are different from the PayPal details.
Maybe someone does a payment but wants to use a PayPal account with a different email, so I would like to know both the emails.
I would like to create a form with these fields:
First name
Last name
Personal email (not Paypal email)
and I want to be able to see these information when I receive the payment.
This is my form:
<div id="paynow" class="contact_form_invoice_payment">
<div class="invoice_payment_title">Pay your invoice here</div>
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input value="_xclick" name="cmd" type="hidden">
<input value="nessa#stressless.ie" name="business" type="hidden">
<input value="http://www.matrix-test.com/stressless/" name="return" type="hidden">
<input value="0" name="no_shipping" type="hidden">
<input value="1" name="no_note" type="hidden">
<input value="EUR" name="currency_code" type="hidden">
<input value="IE" name="lc" type="hidden">
<input value="PP-BuyNowBF" name="bn" type="hidden">
<input value="0" name="tax" type="hidden">
<input value="Online Payment" name="item_name" type="hidden">
<input value="OP" name="item_number" type="hidden">
<div class="first_name_invoice_payment">
First name (requiered) <br />
<input value="" name="first_name">
</div>
<div class="last_name_invoice_payment">
Last name (requiered)<br />
<input value="" name="last_name">
</div>
<div class="email_invoice_payment">
Email (requiered)<br />
<input value="" name="email">
</div>
<div class="first_name_invoice_payment">
Invoice Number (requiered)<br />
<input id="inv" value="" name="item_number">
</div>
<div class="last_name_invoice_payment">
Amount - Euro Only (requiered)<br />
<input id="amt" value="" name="amount">
</div>
<div class="job_title_invoice_payment">
<input alt="PayPal - The safer, easier way to pay online!" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" type="image" class="no-width image" style="width:auto !important; border:none; margin-top:20px;">
<img height="1" width="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" alt="">
</div>
</form>
</div>
I tried to put these fields:
name="first_name"
name="last_name"
name="email"
but I can't see them in the PayPal email and even in the PayPal backoffice.

Try using the variables below to gather the information you are looking for:
on0 = CustomerName
os0 = "Enter First and Last Name"
on1 = CustomerEmail
os1 = "Enter Email Address"
Developer: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
Your updated code would look similar to this:
<input value="CustomerName" name="on0" type="hidden">
<input value="CustomerEmail" name="on1" type="hidden">
<div class="first_name_invoice_payment">
First/Last name (requiered) <br />
<input value="" name="os0">
</div>
<div class="email_invoice_payment">
Email (requiered)<br />
<input value="" name="os1">
</div>

Related

Mailto function is not working in Mobile view responsive

hey here is the code whenever my site is converted into the mobile view then mailto function is not working? can anyone suggest to me a solution to how he is works in mobile-view?
<form id="myForm" action="mailto:syedali6097#gmail.com" method="post" enctype="text/plain">
<h2>Win</h2>
<input name="name" type="text" placeholder="Enter Name">
<br><br>
<input name="subject" type="text" placeholder=" Subject">
<br><br>
<!-- <label>Email:-</label> -->
<input name="email" type="text" placeholder="Enter Email">
<br><br>
<input name="number" type="number" placeholder=" Enter Phone Number">
<br><br>
<p class="text-center">Fave Vape Flavour:-</p>
<textarea type="text" name="Description" size="50" rows="5" placeholder="Type Message"></textarea>
<br><br>
<input type="submit" value="Send" onclick="myFunction()">
<input type="reset" value="Reset">
</form>

How to have completed form emailed to me

I have a form with multiple text inputs, radio inputs, checkboxes and a file input (jsfiddle for reference):
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post" id="form">
<div id="contact">Contact Info
<br><input type="text" name="fname" placeholder="First Name*" required>
<br><input type="text" name="lname" placeholder="Last Name*" required>
<br><input type="text" name="company" placeholder="Company">
<br><input type="email" name="email" placeholder="Email Address*" required>
</div><br>
<div id="Specifics">Specifics
<div id="location">Location
<br><input type="radio" name="pages" id="page1" value="2" required><label for="page1"> /page1</label>
<br><input type="radio" name="pages" id="page2" value="1.5"><label for="page2"> /page2</label>
<br><input type="radio" name="pages" id="page3" value="1.5"><label for="page3"> /page3</label>
<br><input type="radio" name="pages" id="page4" value="1.5"><label for="page4"> /page4</label>
<br><input type="radio" name="pages" id="page5" value="1"><label for="page5"> /page5</label>
<br><input type="radio" name="pages" id="page6" value="1"><label for="page6"> /page6</label>
</div><br>
<div id="topbtm">Top or Bottom?
<br><input type="radio" name="location" id="tb_top" required><label for="tb_top">Top</label>
<br><input type="radio" name="location" id="tb_btm"><label for="tb_btm">Bottom</label>
</div><br>
<div id="selection">Selection
<br><label><input type="checkbox" name="selection" id="s1" value="4"><span>1</span></label>
<label><input type="checkbox" name="selection" id="s2" value="4"><span>2</span></label>
<label><input type="checkbox" name="selection" id="s3" value="4"><span>3</span></label>
<label><input type="checkbox" name="selection" id="s4" value="4"><span>4</span></label>
<label><input type="checkbox" name="selection" id="s5" value="4"><span>5</span></label>
<label><input type="checkbox" name="selection" id="s6" value="4"><span>6</span></label>
<br><label><input type="checkbox" name="selection" id="s7" value="4"><span>7</span></label>
<label><input type="checkbox" name="selection" id="s8" value="4"><span>8</span></label>
<label><input type="checkbox" name="selection" id="s9" value="4"><span>9</span></label>
<label><input type="checkbox" name="selection" id="s10" value="4"><span>10</span></label>
<label><input type="checkbox" name="selection" id="s11" value="4"><span>11</span></label>
<label><input type="checkbox" name="selection" id="s12" value="4"><span>12</span></label>
</div><br>
<div id="weeks">Weeks
<br><select required><option value="" disabled selected>Select one</option><option value="7">1 week</option><option value="14">2 weeks</option><option value="21">3 weeks</option><option value="28">4 weeks</option></select>
</div>
</div><br>
<div id="info">Info
<br><input type="file" name="image" value="image" accept="image/jpg" required>
<br><input type="url" name="url" placeholder="Linked Website (URL)" required>
<br><input type="text" name="color" placeholder="Background Color" required>
<br><input type="text" name="hovertext" placeholder="Hover Text">
</div><br>
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="(myemail)" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="item_name" value="Purchase" />
<input type="hidden" name="amount" id="total" value=""/>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
</form>
How can I have the input ID's, not values emailed to me upon a certain action?
I don't know a way to submit this form when a payment is successfully completed (please let me know if this is possible), so another idea I had was to have PayPal redirect to a "success" page when the payment was successful, and submit the form when that "success" page is reached. So 1) how can I have this form be submitted when that page is reached and
2) how can I only receive the input ID's instead of the values?
i didn't understand well .But if you want to get the id of The last record inserted in database , you can use:
mysqli_insert_id($connection_value)
and you can use mail() to send an email !!!.
mail(to,subject,message,headers,parameters);
And if you just want to send your elements id's , There are several ways to do that ! On is to make hidden inputs and pass their values to your page then send them use email ! the secound way that I can suggest you is to use javascript , and make an ajax file that gets you'r form id's then send them to your mail !
Have a good day ! Apr <3

Remove delivery address from Paypal checkout?

I have a Paypal form on my website, but for some reason when the user goes to the checkout Page on Paypal's website, it shows their 'delivery address'. Does anyone know how I can remove this? Thank you
<section style="background-color:white;border-radius:25px;"
id="three" class="wrapper style3 special">
<div class="container 50%">
<form id="Order" name="Order"
action="https://www.paypal.com/cgi-bin/webscr" method="post">
<h2 style="color:black;">Your Page:</h2> <input type="hidden"
name="on0" value="URL" />
<input style="border:1px solid grey;" name="os0" type="text"
class="formtext" />
<br />
<br />
<br />
<h2 style="color:black;">Your Email Address:</h2>
<input type="hidden" name="on1" value="EMAIL" />
<input style="border:1px solid grey;" name="os1" type="text"
class="formtext" />
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="<?php echo $paypalemail; ?>">
<input type="hidden" name="lc" value="U">
<input type="hidden" name="item_name" value="My Product Name">
<input type="hidden" name="amount" value="<?php echo $bronze_price; ?>">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the
seller">
<br />
<br />
<table width="50px" border="0" cellpadding="0" cellspacing="0">
<p style="color:black;">You have read and agreed to our <a style="text-
decoration:underline;" href="http://mywebsite.com/terms-of-service"
target="_blank">Terms of Service</a>
<tr onclick="document['Order'].submit()">
<td style="background-color:#3cadd4;width:5px;cursor: pointer;"><div><a
style="color:white;" href="#" onclick="document['Order'].submit()">PAY
NOW</a>
</div></td>
</tr>
</table>
<p style="color:black;">Price: $<?php echo $bronze_price; ?></p>
</form>
</div>
</section>
Please pass the parameter "no_shipping =1" in the PayPal button code and on the PayPal checkout page Delivery address will be removed.
no_shipping No
Do not prompt buyers for a shipping address.
Valid value is:
0 - Prompt for an address, but do not require one.
1 - Do not prompt for an address.
2 - Prompt for an address and require one.
Default is 0.
Refer the following link for more information about PayPal Button HTML variables: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

Bypass onclick form search value

JSFiddle: https://jsfiddle.net/apamvz1r/1/
I have the following code that I would like to eliminate the need for the visitor to click the radio button before searching... Is this possible? I would like to completely eliminate this field or hide it.
<input type="radio" name="RProducts" onclick="frmSearch.Products.value='BB'">
If you don't click on the radio input, it doesn't work properly, even if i pre-select it, it still needs to be directly clicked on. Is there a way around this?
<form action="http://search1.bestbenefits.com/provsearch.asp" method="post" name="frmSearch" id="frmSearch" target="_blank" onSubmit="return CheckParams()">
<input type="hidden" name="Products" value="">
<input type="hidden" name="Title" value="24-7_MedPlan-20140416">
<input type="radio" name="RProducts" onclick="frmSearch.Products.value='BB'">Search Providers
<br />Zip Code: <input type="text" size="9" name="Zip" maxlength="5"><br />
<input type="submit" value="Search for Providers">
</form>
This works for me:
<form action="http://search1.bestbenefits.com/provsearch.asp" method="post" name="frmSearch" id="frmSearch" target="_blank" onSubmit="return CheckParams()">
<input type="hidden" name="Products" value="">
<input type="hidden" name="Title" value="24-7_MedPlan-20140416">
<input checked="checked" type="radio" name="RProducts" onclick="frmSearch.Products.value='BB'">Search Providers
<br />Zip Code: <input type="text" size="9" name="Zip" maxlength="5"><br />
<input type="submit" value="Search for Providers">
</form>

Modx FormIt, got 2 forms, formit send both

This is my code, I can't understand why formit sends both the forms. It means I have 2 messages instead of one.
I use two templates and different &prefix:
[[!FormIt?
&hooks=`spam,email,emailUser`
&emailTo=`sitename#gmail.com`
&emailFromName=`[[+name]]`
&emailTpl=`ContactTpl`
&prefix="fi"
]]
<div>[[+fi.error.error_message]]</div>
<form action="[[~[[*id]]]]" method="post" id="recall">
<input type="hidden" name="nospam:blank" value="" />
<input type="text" name="name" class="right" id="recall_name" required="required" value="[[+fi.name]]">
<input type="number" name="number" class="right" id="recall_number"value="[[+fi.number]]" >
<textarea name="message:required:stripTags" value="[[+fi.message]]"></textarea>
<input type="submit">
</form>
[[!FormItRetriever]]
[[!FormIt?
&hooks=`spam,email,emailUser`
&emailTo=`sitename#gmail.com`
&prefix="cs"
&emailFromName=`[[+sup_name]]`
&emailTpl=`SupportTpl`
]]
<div>[[+fi.error.error_message]]</div>
<form action="[[~[[*id]]]]" method="post" id="support">
<input type="hidden" name="nospam:blank" value="" />
<label for="name" class="right" >Имя:</label>
<input type="text" name="name" class="right" id="support_name" required="required" value="[[+cs.sup_name]]">
<input type="number" name="number" value="[[+cs.sup_number]]">
<textarea name="message:required:stripTags"value="[[+cs.sup_message]]"></textarea>
<input type="submit">
</form>
take a look at the submitVar attribute: http://rtfm.modx.com/extras/revo/formit
your formit calls don't know which form they should be submitting. Set a name on each form submit control and set the submitVar for each in your formit calls.