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>
Related
I am importing a form written in GoogleApps Script into an iframe on a page built with Squarespace but for the life of me cannot prevent the form from submitting. I am using:
window.addEventListener( 'load', preventFormSubmit );
as suggested in GAS documentation but this does not seem to be triggering the preventFormSubmit function. Instead, when the submit button is clicked the form submits and goes to a blank google page. Also the alerts in the preventFormSubmit function (now commented out) never display which suggests that the form is never called.
I have spent days on this, cannot find an answer anywhere and can no longer see the woods for the trees. Any clues as to what I am doing wrong?
Squarespace is a website builder which enables one to embed code, in this case as an iframe.
My code:
js.html:
<script>
function preventFormSubmit() {
//alert( "prevent form submit triggered" );
var forms = document.querySelectorAll('form');
for (var i = 0; i < forms.length; i++) {
forms[i].addEventListener('submit', function(event) {
event.preventDefault();
});
}
//alert( "forms prevented from submitting: " = forms.length );
}
window.addEventListener( "ready", preventFormSubmit );
function handleFormSubmit(formObject) {
google.script.run
.withSuccessHandler( showSuccess )
.withFailureHandler( showError )
.processForm_1( formObject );
}
</script>
html:
<!DOCTYPE html >
<head>
<base target="_top" >
<?!= include('css'); ?>
<?!= include('js'); ?>
</head>
<body>
<div id="formDiv" class="card" >
<h2 id="title" >Alternative Booking form</h2>
<form id="alternative-booking-form-1" onsubmit="handleFormSubmit(this)" >
<fieldset>
<legend>About You</legend>
<p>Please tell us a bit about yourself.
</p>
<input type="text" id="firstName" name="firstName" form="alternative-booking-form-1"
placeholder="your first name" value="" required
/><br />
<input type="text" id="lastName" name="lastName" form="alternative-booking-form-1"
placeholder="your last name" value="" required
/><br />
<input type="text" id="title" name="title" form="alternative-booking-form-1"
placeholder="your title, eg: mr, mrs, ms etc" value="" /><br>
</fieldset>
<fieldset>
<legend>Your Contact Details</legend>
<p>We will only use your contact details in case we need to contact you with regard to
this booking, unless you consent
to further communications, as offered later in this booking process.</p>
<input type="email" id="email" name="email" form="alternative-booking-form-1"
placeholder="your email address" value=""
required /><br />
<input type="tel" id="phone" name="phone" form="alternative-booking-form-1"
placeholder="phone" value="" required /><br />
</fieldset>
<fieldset>
<input type="hidden" id="form" name="form" form="alternative-booking-form-1" value="1" />
<br />
<input type="submit" id="submit" name="submit" form="alternative-booking-form-1"
class="red" value="Next →" />
<br />
<br />
</fieldset>
</form>
</div>
<div id="output" name="output" ></div>
</body>
<!DOCTYPE html >
<head>
<base target="_top" >
<?!= include('css'); ?>
<?!= include('js'); ?>
</head>
<body>
<div id="formDiv" class="card" >
<h2 id="title" >Alternative Booking form</h2>
<form id="alternative-booking-form-1" >
<fieldset>
<legend>About You</legend>
<p>Please tell us a bit about yourself.
</p>
<input type="text" id="firstName" name="firstName" form="alternative-booking-form-1"
placeholder="your first name" value="" required
/><br />
<input type="text" id="lastName" name="lastName" form="alternative-booking-form-1"
placeholder="your last name" value="" required
/><br />
<input type="text" id="title" name="title" form="alternative-booking-form-1"
placeholder="your title, eg: mr, mrs, ms etc" value="" /><br>
</fieldset>
<fieldset>
<legend>Your Contact Details</legend>
<p>We will only use your contact details in case we need to contact you with regard to
this booking, unless you consent
to further communications, as offered later in this booking process.</p>
<input type="email" id="email" name="email" form="alternative-booking-form-1"
placeholder="your email address" value=""
required /><br />
<input type="tel" id="phone" name="phone" form="alternative-booking-form-1"
placeholder="phone" value="" required /><br />
</fieldset>
<fieldset>
<input type="hidden" id="form" name="form" form="alternative-booking-form-1" value="1" />
<br />
<input type="button" id="submit" name="submit" form="alternative-booking-form-1"
class="red" value="Next →" />
<br />
<br />
</fieldset>
</form>
</div>
<div id="output" name="output" ></div>
<script>
window.onload = function() {
document.getElementById("alternative-booking-form-1").addEventListener( "ready", handleFormSubmit );
}
function handleFormSubmit(formObject) {
google.script.run
.withSuccessHandler( showSuccess )
.withFailureHandler( showError )
.processForm_1( formObject );
}
</script>
</body>
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>
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
I'm trying to get the 'contact' form on my page in the middle of the webpage.
<form id="contact_form" action="#" method="POST" enctype="multipart/form-data">
<div class="row">
<label for="name">Uw naam:</label><br />
<input id="name" class="input" name="name" type="text" value="" size="30" /><br />
</div>
<div class="row">
<label for="email">Uw e-mail:</label><br />
<input id="email" class="input" name="email" type="text" value="" size="30" /><br />
</div>
<div class="row">
<label for="message">Uw vraag:</label><br />
<textarea id="message" class="input" name="message" rows="7" cols="30"></textarea><br />
</div>
<input id="submit_button" type="submit" value="Verstuur bericht" />
</ul>
</form>
use css:
#contact_form {width:400px;display:block;margin:0 auto;}
contact_form {position:absolute; top:50px;left:10px;width:500px;display:block;margin:0 auto;}
I need some help with my login form. On every browser I am able to login except Safari 8.
<form action="index.php?mod=users&do=login" name="frm" id="frm" class="rf" method="post">
<label for="email">Email</label>
<input type="email" id="email" name="email" value="<?php Outtext($frmdata['email']); ?>" class="rfield"><br>
<div class="verror"><?php if($error['email']!='') Outtext($error['email']); ?></div>
<br>
<label for="password">Passwort</label>
<input type="password" id="password" name="password" value="" class="rfield"><br>
<div class="verror"><?php if($error['password']!='') Outtext($error['password']); ?></div>
<br>
<button name="login" class="login-button button">Login</button><br>
<span style="color:#030303">Passwort</span> vergessen?
<a class="registerButton" href="#">Registrieren?</a>
<a class="manager_loginButton" href="#"><span style="color:#030303">Studiomanager</span> Login</a>
<input type="hidden" name="redirect_to" value="<?php echo($_SERVER['REQUEST_URI']); ?>">
</form>
This one worked for me:
<input type="hidden" name="login" value="login">
Right under the other
<input type=hidden>
tag.