-
Notifications
You must be signed in to change notification settings - Fork 13
Plugin example
griffincox edited this page Feb 14, 2019
·
6 revisions
function tomorrow() {
return Peteshow.formatDate('dd/mm/yy', new Date(new Date().getTime() + (24 * 60 * 60 * 1000)))
}
var options = {
emailDomain: 'peteshow.com',
rules : {
'input[name*=coupon]' : 'FREE99',
'input[name*=home_address]' : Faker.Address.streetName(),
'input[name*=company_main_number]' : Peteshow.randomNumber(6, '01234'),
'#tomorrows_date' : tomorrow(),
},
reuse : {
'input[name*=first_name]' : 'login',
'input[name*=last_name]' : 'login',
'input[name*=birth_date]' : 'login'
},
ignore : ['optional_field'],
blur : true,
force : {
'input[name*=hidden]' : 'forced hidden field',
}
}
$(function() {
Peteshow.init(options)
});