How to add custom clickable text box

Find all the help you need on the script Arfooo Directory.
Please refer any bugs found.

Moderator: effi

How to add custom clickable text box

Postby erocode » Wed Mar 03, 2010 4:02 am

Hi ,

First of all thanks for the great script , but i got a little problem ,
When i add a new custom text field it only show text i whant to put a <a href link in the text box but it just shows the code on the details page.. could someone tell me how to set it o it will show html code ?

Greetz
erocode
 
Posts: 3
Joined: Tue Mar 02, 2010 11:28 am

Re: How to add custom clickable text box

Postby effi » Wed Mar 03, 2010 5:11 am

hello
is it a textarea or a text , new custom area ?

if you are good in coding, there is probably a thing to do with suffix you can add to the area.
you test the value of the suffix
in the french wish list I mentioned a url property to text area.
effi
 
Posts: 195
Joined: Fri May 22, 2009 10:04 am

Re: How to add custom clickable text box

Postby erocode » Wed Mar 03, 2010 6:27 am

Hi ,

its a text area ,
yeah i whas also playing a bit with the codes but i just cant get it right ...

here is the code

Code: Select all
{if !empty($site.extraFields)} 
{foreach from=$site.extraFields value=extraField}
{if $extraField.label || $extraField.value}
<div class="form_details">
<label class="title_details">{$extraField.name}</label>
<div class="infos_details">
{switch from=$extraField.type}
{case value="text"}
    {$extraField.value}
{case value="textarea"}
    {$extraField.value}
{case value="range"}
    {$extraField.value}   
{case value="select"}
    {$extraField.label}   
{case value="radio"}
    {$extraField.label}   
{case value="checkbox"}
    {foreach from=$extraField.label value=extraFieldLabel name="loop"}{if $templatelite.foreach.loop.iteration == 1}{$extraFieldLabel}{else}, {$extraFieldLabel}{/if}{/foreach}
{/switch}
{if $extraField.suffix}
{$extraField.suffix}
{/if}
</div>
</div>



Could u please help me a little :)
erocode
 
Posts: 3
Joined: Tue Mar 02, 2010 11:28 am

Re: How to add custom clickable text box

Postby effi » Wed Mar 03, 2010 10:00 am

Hi

for my purpose, I decided that all text custom area will be links so
I transformed
Code: Select all
{case value="text"}
    {$extraField.value}


in
Code: Select all
{case value="text"}
   <a hret="{$extraField.value}" target=_blank>{$extraField.value}</a>


but i think it would be better to put a condition if the suffix value is for example url
Code: Select all
{if $extraField.suffix}
{$extraField.suffix} ]{case value="url"}
   <a hret="{$extraField.value}" target=_blank>{$extraField.value}</a>
{/if}

as I am not a coder
but I have not the time to test it so if you do let me know !
effi
 
Posts: 195
Joined: Fri May 22, 2009 10:04 am

Re: How to add custom clickable text box

Postby erocode » Wed Mar 03, 2010 1:17 pm

well thanks the first solution worked as it must be :) thanks for the support !
erocode
 
Posts: 3
Joined: Tue Mar 02, 2010 11:28 am


Return to Installation, support and bug reports

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

 
Copyright © arfooo.net  2007 - 2010  -  All rights reserved.
Arfooo website group: petites annonces gratuites   voyance en direct - tirage tarot   Consultant en référencement
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | phpBB SEO
cron