Posted By

tgbdad on 03/18/10


Tagged

drupal cck


Versions (?)

Set allowed integer values in CCK select list using PHP


 / Published in: PHP
 

This example will return values -15 through 15 to be presented to the user in a select list for an integer CCK field.

  1. $rows = array();
  2. for ($i = -15; $i <= 15; $i++) {
  3. $rows[$i] = $i;
  4. }
  5. return $rows;

Report this snippet  

You need to login to post a comment.