Я применил функцию связанного автозаполнения, но у меня есть 2 вопроса по этому поводу:
- Вот ссылка на страницу : страница размещена на CMS HubSpot - https://inboundmarketing.inboundmantra.com/inbound-marketing-company-contact-inbound-mantra
Вот код кнопки автозаполнения для указанной страницы:
<button id="autofill-button">
<span class="logo">IN</span>
<div class="button-text-container">
<span class="button-text">
AutoFill with <strong>LinkedIn</strong>
</span>
</div>
</button>
<style>
#autofill-button {
height: 33px;
width: 174px;
cursor: pointer;
color: #FFF;
padding: 0;
border: 1px #2D6FA8 solid;
border-radius: 3px;
font-size: 12px;
position: relative;
overflow: hidden;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #79adcb;
background: -webkit-linear-gradient(top, #79adcb 15%, #2373ac 100%);
background: linear-gradient(to bottom, #79adcb 15%, #2373ac 100%);
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
font-family: Arial;
font-size: 12px;
display: inline-block;
}
#autofill-button:hover {
background: #5a8193;
background: -webkit-linear-gradient(top, #5a8193 15%, #1e4d72 100%);
background: linear-gradient(to bottom, #5a8193 15%, #1e4d72 100%);
}
#autofill-button:active {
background: #1e4d72;
background: -webkit-linear-gradient(top, #1e4d72 15%, #5a8193 100%);
background: linear-gradient(to bottom, #1e4d72 15%, #5a8193 100%);
}
#autofill-button .logo {
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 34px;
color: transparent;
background: url(https://www.linkedin.com/scds/common/u/img/sprite/sprite_connect_v13.png) no-repeat scroll 0 -347px transparent;
}
#autofill-button .button-text-container {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: table;
width: 171px;
height: 33px;
}
#autofill-button .button-text {
display: table-cell;
vertical-align: middle;
}
span.IN-widget {
height: 0 !important;
visibility: hidden;
opacity: 0;
}
</style>
<script>
$('#autofill-button').click(function(){
$('span.IN-widget *').click();
});
</script>
<script type="in/Login"></script>
<script type="text/javascript" src="//platform.linkedin.com/in.js">// <![CDATA[
api_key: 81ndwffuhqmres
authorize: false
lang: en_US
</script>
<script>
setTimeout(function(){
var callbackScope, extraData;
function callback(args) {
var fields = ['first-name', 'last-name', 'email-address', 'id', 'headline', 'pictureUrl', 'positions', 'num-connections'];
IN.API.Profile("me").fields(fields).result(function(profiles) {
member = profiles.values[0];
console.log(member);
$('[id*="firstname"]').val(member.firstName);
$('[id*="lastname"]').val(member.lastName);
$('[id*="email"]').val(member.emailAddress);
$('#headline').val(member.headline);
$('#picture').attr("src", member.pictureUrl);
var i = 0;
for (position of member.positions.values) {
$('#position' + (i++)).val(position.company.name + " - " + position.title);
}
}).error(function(data) {
console.log(data);
});
}
IN.Event.on(IN, 'auth', callback, callbackScope, extraData);
},500);
</script>
Поля заполнены полностью, но поле номера телефона не работает.
- Этот код не работает, когда я запускаю этот код в WordPress.
Вот ссылка на страницу : https://www.inboundmantra.com/predictive-lead-scoring
Пожалуйста, дайте мне знать, как это исправить.
Заранее спасибо ...