[SOLVED] CGfeedback extra field: website

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Elise
Forum Members
Forum Members
Posts: 24
Joined: Sun Jan 03, 2010 10:13 pm

[SOLVED] CGfeedback extra field: website

Post by Elise »

I'm making a blog with the latest versions of CGBlog, CGFeedback, CGExtensions and CGSimpleSmarty.
In the CGFeedback form I created 2 extra field: one in which the visitor can fill in in which country he/she is living and one in which they can fill in their own website. Now I would like to make the website appear as a link. For this I changed the CGFeedback form-template:

Code: Select all

{if isset($one.fields)}    
      {foreach from=$one.fields key='name' item='field'}
{if $name == "Website" }
      <div class="feedback_item_field">
Website: <a href="{$field.value}">{$field.value}</a>
      </div>
{if $name == "Country" }
<div class="feedback_item_field">
Country: {$field.value}
      </div>
{/if}
      {/foreach}
    {/if}
This is working fine, but if the visitor doesn't fill in http:// before their url, my root-url is put in front of the visitors url, and then the link doesn't work of course.
Does someone have a solution for this?
Last edited by Elise on Wed Feb 03, 2010 8:26 pm, edited 1 time in total.
JeremyBASS

Re: CGfeedback extra field: website

Post by JeremyBASS »

try this...


{$field.value}

this will filter out the http:// if they put it in.. so now you hard code the http:// back in.. hope this helps.. Cheers
jeremy
Elise
Forum Members
Forum Members
Posts: 24
Joined: Sun Jan 03, 2010 10:13 pm

Re: CGfeedback extra field: website

Post by Elise »

Works great, thank you!  :D
JeremyBASS

Re: [SOLVED] CGfeedback extra field: website

Post by JeremyBASS »

No prob.. it's good karma for the soul.. Cheers  ;D
Post Reply

Return to “Modules/Add-Ons”