【问题标题】:<a> href attribute adding current page url to links built in Gravity Forms html field<a> href 属性将当前页面 url 添加到 Gravity Forms html 字段中构建的链接
【发布时间】:2017-12-18 02:54:15
【问题描述】:

在 Gravity Forms 中构建表单时,我们在表单中放置了一些 HTML 块,这些块仅在给出特定答案时才会显示(用于个性测验)。表单中使用的html示例如下:

<table style="border: none;">
<tbody>
    <tr>
        <td style="width: 40%; text-align: center;">
            <img src="https://familytraveller.com/wp-content/uploads/2017/07/Bobbis-Cools-ES-Palette-300x300.jpg">
        </td>
        <td style="width: 60%; padding: 0 0 0 30px;"><h3>You chose City Break: Bobbi’s Cools Eye Shadow Palette</h3>
        <p>Take along the ultimate eye shadow palette, designed by Bobbi Brown to make it easy for any woman to create endless standout eye looks.
<a href=“http://lhrt4.worlddutyfree.com/lhrt4_en/bobbi-brown-palette-2.html“><h3>Buy it here</h3></a></p></td>
        </tr>
    </tbody>
</table>

虽然提供了完整的 url,并且源代码显示了正确的 href 属性,但链接没有正常工作,包含链接的页面的 url 被附加到 href 中的 url。例如,在这种情况下,链接指向 "https://familytraveller.com/travel-tips/summer-sunshine-beauty-quiz/http://lhrt4.worlddutyfree.com/lhrt4_en/bobbi-brown-palette-2.html" 。

我不明白为什么会这样。我该如何阻止这种情况发生?是不是因为链接在表单中。谢谢。

【问题讨论】:

    标签: html wordpress forms gravity-forms-plugin gravityforms


    【解决方案1】:

    我用单引号替换了 href 属性中的双引号(“...”),这解决了问题

    【讨论】:

      猜你喜欢
      • 2014-08-21
      • 2015-01-27
      • 2014-10-21
      • 2016-05-25
      • 1970-01-01
      • 2018-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多