Jump to content

Recommended Posts

Hi all,

Is it possible to process  HTML  in an Calculated Field. In the code below, I would like to change the text in an image.

CASE

WHEN [@field:PAARD_KOPPELINGEN_soort_koppeling]= 1 THEN 'Ruiter/Verzorger koppeling: [@field:GEBRUIKERS_volledige_naam]' 

ELSE  'Stal medewerker koppeling: [@field:STAL_GEGEVENS_stalnaam]'

END

Regards Peter

Link to post
Share on other sites

Tanks MayMusic,

This has become the solution

<script>

var pksoork='[@field:PAARD_KOPPELINGEN_soort_koppeling]';
var gbrvnaam='[@field:GEBRUIKERS_volledige_naam]';
var pkusid='[@field:PAARD_KOPPELINGEN_user_id_koppeling]';
var userid='[@authfield:GEBRUIKERS_user_id]';
var peid='[@field:PAARDEN_eigenaar_id]'; 
var sgstnaam='[@field:STAL_GEGEVENS_stalnaam]'; 

if(pksoork==1)
{ 
document.write('<IMG SRC="https://horseplanner.nl/wp-content/uploads/2016/06/paard-icon.png" ALT="logboek" WIDTH="30" HEIGHT="24" ALIGN="center"></A><br />[@field:GEBRUIKERS_volledige_naam]');
}
else if(pksoork==2&&pkusid==userid)
{ 
document.write('<IMG SRC="https://horseplanner.nl/wp-content/uploads/2016/06/stal-icon-e1466102511312.png" ALT="logboek" WIDTH="30" HEIGHT="24" ALIGN="center"></A><br />[@field:GEBRUIKERS_volledige_naam]');
}
else if(pksoork==3&&peid==userid)
{ 
document.write('<IMG SRC="https://horseplanner.nl/wp-content/uploads/2016/06/ruiter_icon.png" ALT="logboek" WIDTH="30" HEIGHT="24" ALIGN="center"></A><br />');
}

else
{ 
document.write('<IMG SRC="https://horseplanner.nl/wp-content/uploads/2016/06/stalmedewerker-icon-e1466255481754.png" ALT="logboek" WIDTH="40" HEIGHT="24" ALIGN="center"></A><br />[@field:STAL_GEGEVENS_stalnaam]');
}

</script>

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...