<a> href attribute adding current page url to links built in Gravity Forms html field

时间:2017-07-13 10:59:15

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

in building a form in Gravity Forms we have placed some HTML blocks in the form that are only revealed when particular answers are given (for a personality quiz). A sample of html used in the form is as follows:

<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>

The link is not working as it should, although a full url is provided, and the source code shows the correct href attribute, the url of the page containing the link is appended to the url in the href. For example in this case the link leads to " https://familytraveller.com/travel-tips/summer-sunshine-beauty-quiz/http://lhrt4.worlddutyfree.com/lhrt4_en/bobbi-brown-palette-2.html“。

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

1 个答案:

答案 0 :(得分:0)

我用单引号替换了href属性中的双引号(&#34; ...&#34;),这解决了问题