douwen5951 2016-10-19 16:36
浏览 77

LeadiD_token获取值

I have a webform and my leadid_token is generated from Jornaya. and there is a script code that we just put to my webform. My issue is I want to POST the value of tokens to my portal cms how can we do this EX:

<form method="post" action="https://portalcmssample.php" id="form1">
    <input id=" leadid_token " name="universal_leadid" type="hidden" value= "" /></div>
</form>

I did not see the value of the token appearing to my cms portal after I submit? Is there anything I've done wrong?

  • 写回答

1条回答 默认 最新

  • draj30958 2018-02-02 21:04
    关注

    Old question with an easy answer. We use the following solution, which utilizes jQuery. Ensure that you've included jQuery with your scripts and then include this code following after:

    <script type="text/javascript">
      $(document).ready(function () {
      if (!$('#leadid_token').length) {
        $('form').last().append(
          $('<input>').attr({
            type: 'hidden',
            id: 'leadid_token',
            name: 'LeadiDToken'
          }));
      }});
    </script>
    <script id="LeadiDscript" type="text/javascript">
        // Your Jornaya script goes here
    </script>
    

    This code will automatically append a hidden field to your form. Jornaya's script will automatically populate the value of this form after it loads async. The value will be submitted to the server when the form is submitted.

    评论

报告相同问题?

悬赏问题

  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行