Shopify Omnisend Custom HTML Signup Form - forms

I am using omnisend app for Shopify subscribe list. I am using a custom form to integrate the input data.
For the ominsend form, they have own class to capture data.
Like this:
<form class="my-form omnisend-subscribe-form" action="/subscribe" method="post">
<input class="omnisend-subscribe-input-email" type="text" placeholder="Enter your email address" />
<input class="omnisend-subscribe-input-first-name" type="text" placeholder="Enter your first name" />
<input class="omnisend-subscribe-input-last-name" type="text" placeholder="Enter your last name" />
<input type="submit" value="Subscribe!">
</form>
First Name: omnisend-subscribe-input-first-name
Last Name: omnisend-subscribe-input-last-name
Email: omnisend-subscribe-input-email
But for the birthday input data, I am unable to find the class.
How can I dynamic the birthday input data by class?
<form class="my-form omnisend-subscribe-form" action="/subscribe" method="post">
<input class="omnisend-subscribe-input-email" type="text" placeholder="Enter your email address" />
<input class="omnisend-subscribe-input-first-name" type="text" placeholder="Enter your first name" />
<input class="omnisend-subscribe-input-last-name" type="text" placeholder="Enter your last name" />
<input class="omnisend-subscribe-input-?" type="text" placeholder="MM" />
<input class="omnisend-subscribe-input-?" type="text" placeholder="DD" />
<input class="omnisend-subscribe-input-?" type="text" placeholder="YYYY" />
<input type="submit" value="Subscribe!">
</form>

Actually, there is no way to collect the birthday form the omnisend form. This form is not support to collect birthday.

Related

HTML Form Basics for PayPal Payments Standard custom fields

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>

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>

On CodeIgniter, how to repopulate a form only with correct values?

Imagine a form like this:
<form action="test.php" method="post">
<input type="text" name="firstname" value="<?=set_value('firstname')?>" />
<input type="text" name="lastname" value="<?=set_value('lastname')?>" />
<input type="text" name="email" value="<?=set_value('email')?>" />
<input type="submit" name="submit_form" value="OK" />
</form>
If I submit an incorrect email, the CodeIgniter function will write "the field is not valid" and populate the invalid field with the wrong value.
I would like to keep the error message but not the wrong value (I prefer having an empty value). But I also want to keep the re-populating function for correct values.
Here is what I get:
Here is what I want:
[EDIT] SOLUTION FOUND (thanks to Herr Kaleun and Matt Moore)
Example with the email field:
<input type="text" name="email" id="email" value="<?=!form_error('email')?set_value('email'):''?>" />
You can check the fields individually and have a logic like this.
If the error for a specific field is present, you can build a logic on top of that.
if ( form_error('email') != '' )
{
$data['email_value'] = '';
}
else
{
$data['email_value'] = set_value('email');
}
<form action="test.php" method="post">
<input type="text" name="firstname" value="<?=set_value('firstname')?>" />
<input type="text" name="lastname" value="<?=set_value('lastname')?>" />
<input type="text" name="email" value="<?= $email_value; ?>" />
<input type="submit" name="submit_form" value="OK" />
</form>
The Form_error is set when a form value errors out based on the validation. Judging by your use of the set_value function I assume you're using the built in form validation. You can check to see if the message for that field is set if(form_error('fieldname') !=NULL) and set the value based on that.
You may have to setup error messages for each field, which you should be doing anyway. Here is the guide that covers it: http://codeigniter.com/user_guide/libraries/form_validation.html#repopulatingform
<form action="test.php" method="post">
<input type="text" name="firstname" value="<?if(form_error('firstname') != NULL){echo set_value('firstname');}?>" />
<input type="text" name="lastname" value="<?if(form_error('lastname') != NULL){ echo set_value('lastname');}?>" />
<input type="text" name="email" value="<?if(form_error('email') !=NULL){ echo set_value('email');}?>" />
<input type="submit" name="submit_form" value="OK" />
</form>
*NOTE THIS CODE HAS NOT BEEN TESTED *

html / iphone - getting a form alert when attempting to refresh the page

I'm building a site which has a form but for some reason, even if a user doesn't enter info into the form (even if the form hasn't been presented yet - it starts out hidden) - if I refresh the page, iOS gives me a browser alert stating:
are you sure you want to submit this form again?
Any idea why this happens or how to suppress that?
This is my form code:
<div id="vehicle_form">
<form method="post" name="emailForm">
<input class="dField" id="dfEmail" type="email" name="email" value="Email"/><br/>
<input class="dField" id="dfName" type="text" name="firstname" value="First Name"/><br/>
<input class="dField" id="dfLast" type="text" name="lastname" value="Last Name"/><br/>
<input class="dField" id="dfZip" type="text" maxlength="5" name="zip" value="Zip Code"/><br/>
<button id="dFormBack">Back</button><button type="submit" id="dSubmit">Submit</button>
</form>
<div id="dErrors"></div>
</div>
I also have this javascript acting on the form fields:
$j('.dField').focus(function(){
clearInput($j(this)[0]); //The [0] seems to be necessary to retrieve the element at the DOM object level
}).blur(function(){
restoreInput($j(this)[0]);
});
as well as some other form related javascript.
Not sure if this is exactly what you're looking for, but try this:
<form method="post" name="emailForm">
<input type="text" name="email" value="Email" size="30" onfocus="value=''"><br>
<input type="text" name="firstname" value="First Name" size="30" onfocus="value=''"><br>
<input type="text" name="lastname" value="Last Name" size="30" onfocus="value=''"><br>
<input type="text" name="zipcode" value="Zip Code" size="30" onfocus="value=''"><br>
<button id="dFormBack">Back</button><button type="submit" id="dSubmit">Submit</button>
</form>

Select input value from two different forms in one page using mootools

I have two forms with different values in one page.
I want get input value of the form that user clicks on it's submit button, using mootools code.
Mootools code most work for two forms, as same:
<form class="cart_form" >
<input type="hidden" name="order_code" value="KWL-hgy" />
<input type="hidden" name="price" value="40000" />
<input type="hidden" name="name" value="modeling" />
<label>KWL-hgy: <input class="center" type="text" name="qty" value="2" size="3" ></label>
<input type="submit" name="submit" value="Add to cart" />
</form>
<form class="cart_form" >
<input type="hidden" name="order_code" value="KWL-JFE" />
<input type="hidden" name="price" value="12000" />
<input type="hidden" name="name" value="php" />
<label>KWL-JFE: <input class="center" type="text" name="qty" value="1" size="3" ></label>
<input type="submit" name="submit" value="Add to cart" />
</form>
you could do it somehow like this:
$$('form.cart_form').addEvent('submit', function(e){
this.getChildren().each(function(el){
alert(el.get('name') + ': ' + el.get('value'));
});
});
this will fire an event as soon as a form with the class chart_form is submited and loop through all the form's children.