• Resolved mageroya

    (@mageroya)


    Hi all,
    I have a radio button in my form, I add a description in the field “description” and I need to insert in the same description a link to another page, but it doesn’t work, I see thw whole code in the page.

    How could I insert correctly a link?

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @mageroya,

    By default we do not allow HTML in the description fields. However, by using a filter we can achieve this. What we’ll need is the interest group’s ID (which is something like 7f1116a5gd). If you send over the link to your form I can find the ID for you. The filter function will look something like this:

    /** Replace an interest group's description with HTML **/
    add_filter( 'yikes-mailchimp-{$group_id}-description', 'yikes_mailchimp_html_group_description', 10, 2 );
    
    function yikes_mailchimp_html_group_description( $description, $form_id ) {
    	return '<a href="//www.google.com">This is the link.</a>';
    }
Viewing 1 replies (of 1 total)

The topic ‘How to add html code in a field’ is closed to new replies.