Author Topic: Droplet [[fieldcheck]] for validating Optionfield items  (Read 2564 times)


  • Guest
Droplet [[fieldcheck]] for validating Optionfield items
« on: November 21, 2010, 08:39:57 PM »

i haven't contributed some little pieces for a long time so here is a little droplet for checking field in Options from Newsmodule or Topics in my example:

Dropletname: fieldcheck


Code: [Select]
<?php //only for color dont copy
if (isset($field) and $feld != '') {
  if (isset(
$name)) {
$output '<strong>'.$name.'</strong>: '.$feld;   //maybe other output is wanted here
$output $feld;
$output '&nbsp;';


Examplecall: [[fieldcheck?field=[SHORT_DESCRIPTION]&name=Shorttext]]

Output would be like      "shorttext: Short_description"

example from Topics Options:
Code: [Select]
<h3 class="tp_headline_termine">{TITLE}</h3>

If the field is empty (like in Topics some XTRA fields) no output would be created or you could set a default output...

only a little piece of code btu mybe helpfully.

best regards


« Last Edit: April 18, 2013, 04:33:03 PM by mr-fan »

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: Droplet [[fieldcheck]] for validating Optionfield items
« Reply #1 on: November 23, 2010, 03:36:11 PM »
Very good Idea, Martin.

Brings some logic into modules 'Layout Fields'.


"Gemeinsam schafft man mehr."

1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander