Skip navigation
Knowledge
Here's where you'll find all the Insight and Knowledge that Inward has to offer.
Here’s what’s been happening at Inward.
document.addEventListener( 'wpcf7submit', function( event ) {
if ( '654' == event.detail.contactFormId )
{
var inputs = event.detail.inputs;
console.log(inputs);
for ( var i = 0; i < inputs.length; i++ )
{
if ( 'Title' == inputs[i].name ) {
var post_title = inputs[i].value;
}
if ( 'FirstName' == inputs[i].name ) {
var first_name = inputs[i].value;
}
if ( 'LastName' == inputs[i].name ) {
var last_name = inputs[i].value;
}
if ( 'Email' == inputs[i].name ) {
var email = inputs[i].value;
}
if ( 'Phonenumber' == inputs[i].name ) {
var phone_number = inputs[i].value;
}
if ( 'LinkedinProfile' == inputs[i].name ) {
var linked_profile = inputs[i].value;
}
if ( 'lookingforrole' == inputs[i].name ) {
var looking_role = inputs[i].value;
}
if ( 'CurrentBasicSalary' == inputs[i].name ) {
var currentsal = inputs[i].value;
}
}
var ajaxurl = jQuery('#ajaxurl').val();
var datasend = {
action : 'save_active_data',
post_title : post_title,
first_name : first_name,
last_name : last_name,
email : email,
phone_number : phone_number,
linked_profile : linked_profile,
looking_role : looking_role,
currentsal : currentsal,
}
jQuery.ajax( {
url: ajaxurl,
type: 'post',
dataType: 'json',
data: datasend,
success( data ) {
console.log(data);
},
} );
}
}, false );