我需要使用聯繫人7有一個嵌入表單,將信息提交給我的Viral Loops帳戶。聯繫表格7:提交javascript的多行
它需要一次表單提交給運行下面的代碼,即on_sent_ok:
VL.options.form_fields.form_firstName = $("#firstname").val(); //capture the first name
VL.options.form_fields.form_email = $("#email").val(); //capture the email
VL.options.form_fields.form_lastName = $("#lastname").val(); //capture the last name (if applicable in your form)
//submit the participant to Viral Loops
VL.createLead(function() {
//any logic to run after the participation
});
我不知道在哪裏或如何添加它,因爲您也可以利用一行代碼只有在高級設置中發送確定。
在此先感謝! :)
它不是最易讀的,但爲什麼不把所有的js放在一行呢?分號將關注區分任何一個語句的結束。 –
這或你可以把它作爲一個函數在你已經入隊的外部JS文件(https://developer.wordpress.org/reference/functions/wp_enqueue_script/)並從on_sent_ok調用函數 – Jonathan