Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Greg Smith 7 posts 31 karma points
    Dec 16, 2009 @ 15:59
    Greg Smith
    0

    Inserting Links Into A Form

    I'm wondering if it is possible to add a link to a field within a contour form? For instance: I have added a checkbox to accept terms and conditions, and would like to make the text a hyperlink to the terms and conditions page.

  • Dan Evans 599 posts 949 karma points
    Jan 09, 2010 @ 10:11
    Dan Evans
    0

    I would like to do this too but any HTML seems to be escaped, e.g.

    Please tick to indicate you have <a href='/terms'>read and understood our Non-disclosure agreement</a>
  • kevin 31 posts 52 karma points
    Jan 12, 2010 @ 11:02
    kevin
    2

    Hello,

    You can do this by using a dictionary item as a label for the field. You can create a dictionary item with html content and use #dictionaryitemalias (with dictionaryitemalias being the name of the dictionaryitem) as the content of the label

  • Dan Evans 599 posts 949 karma points
    Jan 14, 2010 @ 02:46
    Dan Evans
    0

    That did the trick. Good solution!

  • Dan Evans 599 posts 949 karma points
    Feb 04, 2013 @ 19:21
    Dan Evans
    0

    In the new version of Contour 3.0.6 links created using dictionary items are being escaped so not rendering correctly.

  • Dan Evans 599 posts 949 karma points
    Feb 04, 2013 @ 22:32
    Dan Evans
    0

    This is using Razor. The answer is:

    @Html.Raw(@f.Caption)
  • Tim Geyssens 6419 posts 15052 karma points MVP 2x c-trib
    Feb 05, 2013 @ 08:51
    Tim Geyssens
    0

    Thanks for reporting will added to issue tracker and will be updated in next maintenance release

  • Ollie Philpott 6 posts 26 karma points
    May 16, 2013 @ 18:56
    Ollie Philpott
    0

    I'm using 3.0.12 and have noticed that using #dictionaryterm doesn't seem to work - the # is stripped from the field caption when rendering the form

     

    e.g. #terms 

    is displayed as 

    terms

  • Dan Evans 599 posts 949 karma points
    May 16, 2013 @ 18:58
    Dan Evans
    0

    I'd suggest you upgrade. U3 is VERY old.

  • Ollie Philpott 6 posts 26 karma points
    May 16, 2013 @ 18:59
    Ollie Philpott
    0

    sorry, I mean Contour 3.0.12 (Umbraco 6.0.5)!

  • Tim Geyssens 6419 posts 15052 karma points MVP 2x c-trib
    May 16, 2013 @ 19:00
    Tim Geyssens
    0

    And did you populate the terms dictionary item? Language set on the node structure containing the form?

  • Ollie Philpott 6 posts 26 karma points
    May 16, 2013 @ 19:06
    Ollie Philpott
    0

    Ok, was getting ahead of myself - i was previewing the form, where it doesn't display.

    On the page itself, the dictionary term is displayed, although the html is escaped as mentioned above.

  • Tim Geyssens 6419 posts 15052 karma points MVP 2x c-trib
    May 16, 2013 @ 19:19
    Tim Geyssens
    0

    What version are you running?

  • Ollie Philpott 6 posts 26 karma points
    May 17, 2013 @ 10:33
    Ollie Philpott
    0

    Contour 3.0.12 (Umbraco 6.0.5)

  • Ollie Philpott 6 posts 26 karma points
    May 17, 2013 @ 10:45
    Ollie Philpott
    0

    Adding @Html.Raw(@f.Caption) to form.cshtml fixes it, i just thought that CON-242 had fixed it already.

  • Tim Geyssens 6419 posts 15052 karma points MVP 2x c-trib
    May 17, 2013 @ 10:50
    Tim Geyssens
    0

    Yeah looks like it got removed accidently (due to a merge)

  • Chris Van Oort 93 posts 350 karma points
    Oct 15, 2019 @ 19:29
    Chris Van Oort
    0

    I know it's pretty wild to bump a post with the last reply from 6 years ago (original post from 10!! years ago) but this is the one that popped up for me on Google.

    On Umbraco forms 7 you can just drop the HTML into the body text of a Title and Description component on a form, for example:

    Lorem ipsum bacon <a href="https://google.com" target="_blank">Click here to go to google</a> lorem ipsum bacon.
    

    Then that link is rendered properly on the form!

  • Dan Evans 599 posts 949 karma points
    Oct 15, 2019 @ 19:41
    Dan Evans
    0

    In computer years that's about 1000 years after the question was posed!

Please Sign in or register to post replies

Write your reply to:

Draft