如何将当前页面URL分配给隐藏字段

时间:2016-01-26 10:57:29

标签: marketo

我正在尝试将当前页面的网址分配给隐藏的表单字段。

有没有办法做到这一点?

对于隐藏字段的自动填充行为,您只能从以下内容中获取值:

默认值,网址参数,Cookie值,引荐参数

但是我使用的是其他网址,因此不会有参数,但想将整个网址保存到隐藏字段

提前致谢

萨姆

1 个答案:

答案 0 :(得分:0)

这是您可以在Marketo表单上的隐藏字段上设置值的方法:

MktoForms2.loadForm("//app-sjst.marketo.com", "785-UHP-775", 1057, function (form) { 
    // Set values for the hidden fields, "userIsAwesome" and "enrollDate"
    // Note that these fields were configured in the form editor as hidden fields already
    form.vals({"userIsAwesome":"true", "enrollDate":"2014-01-01"});
});

参见示例:http://developers.marketo.com/assets/Forms2DevExamples/example7.html

来源:http://developers.marketo.com/documentation/websites/forms-2-0/

相关问题