Contact Form DB
[resolved] [Plugin: Contact Form 7 to Database Extension] Hyperlink Keywords in Output (3 posts)

  1. pmagony
    Posted 5 years ago #

    Hi Michael,

    Thanks again for supporting your plug-in. It's truly one of the best additions to this community.

    I have a question for you. I want to hyperlink specific keywords in output. I'll apply this in context. I have submissions from my users that are out putted on my website. There are valuable seo keywords that I would like to hyperlink to internal pages within my site.

    I have tried editing the memo field directly in the database, and wrapping the keyword in your typical HTML anchor tag code.

    However, upon saving the changes, the text is not being hyperlinked on the front-end.

    I would like to know two things:

    1. how can I manually link keywords?
    2. how can I automate the process so that anytime a specific word is detected, it's automatically hyperlinked to one of my internal pages?

    Thank you!

  2. Michael Simpson
    Plugin Author

    Posted 5 years ago #

    HTML text that is input to a form or stored in a DB field is escaped when retrieved by the plugin. This is to protect against HTML & Javascript injection attacks.

    I think your best option is to use JQuery to write a script in your page. the script would look for your keywords and replace them with links. Here is an example: http://stackoverflow.com/questions/4754467/make-keyword-into-link-automatically-globally

  3. pmagony
    Posted 5 years ago #

    Michael, thanks for your direction. I was able to successfully get this to work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form DB
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic