PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Hyperlinked links

  1. Toppolino
    Member

    I am testing G Forms, I have a simple Post Field forms where I show up the default fields plus a Custom Field which I want to display the user's website. In the Field Properties>Field Type I chose Website.

    The form shows up OK and the user can enter the website URL in the field (which also when displayed starts with http://, which is nice).

    Problem is when the post is displayed the http://www.whatever.com site is not hyperlinked, you can't click on it.

    I need to be sure that the links entered are clickable, how can I do that please??

    Posted 14 years ago on Tuesday December 14, 2010 | Permalink
  2. Only the value is stored as the custom field. Not HTML. The reason why the Website field is hyperlinked in the admin is because the admin turns it into a hyperlink, the data is stored as just a URL.

    How are you outputting the custom field value in your post? Via the Content Template functionality or via your theme template?

    If you are using the Content Template then you need to wrap the field variable in a link and output the field variable again as part of the HREF.

    If you have custom code in your theme to display the custom field then you need to edit your theme and wrap the custom field output in a link and output the custom field twice.. as the HREF and then the link text itself.

    All that is stored is the website address so you have to turn it into a hyperlink if thats how you want it displayed.

    Posted 14 years ago on Tuesday December 14, 2010 | Permalink
  3. Toppolino
    Member

    I did not touch the theme code so I believe I output via the Content Template functionality... in this case how do I wrap the field variable in a link ...??

    I mean I would like the visitors to enter the links in the posts and these get automatically published (with clickable links), no intervention no editing from the admin.

    Thank you so much Carl for the prompt help.

    Posted 14 years ago on Tuesday December 14, 2010 | Permalink
  4. If you are using the Content Template then you would edit the Content Template and wrap the field variable that outputs the value in a link like this:

    <a href="{the field variable}">{the field variable}</a>

    It won't look exactly like that, the variable will be different as it is dynamic. But you'd use the same variable for the HREF and the link text.

    Posted 14 years ago on Tuesday December 14, 2010 | Permalink
  5. Toppolino
    Member

    Ouch I appreciate the help but this is way above my head I'm afraid... :)

    I have no idea where to find this Content Template, also how to edit the field variable sounds quite mysterious... I am trying to search the forum via google to shed some light on my ignorance, little luck so far.....

    Posted 14 years ago on Wednesday December 15, 2010 | Permalink
  6. Well if your custom field is already showing up in your post then you must have configured it to go there somehow.

    The Content Template is an option on the Post Body field on your form. You would edit your form, edit the Post Body field that is on your form and then configure the Content Template.

    If the Content Template on the Post Body field isn't already checked and being used, then you most have implemented it in your theme itself.

    How did you get it working to begin with?

    Posted 14 years ago on Wednesday December 15, 2010 | Permalink