Skip to content

Commit

Permalink
Force minimum number of items
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienheraud committed Jul 17, 2015
1 parent d05ddf8 commit 137443c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/cck_field/field_x/field_x.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public function onCCK_FieldPrepareForm( &$field, $value = '', &$config = array()
// Prepare
$f = self::_getChild( $field, $config );
$xn = ( $value ) ? ( ( is_array( $value ) ? count( $value ) : $value ) ) : $field->rows;
$xn = max( $field->minlength, $xn );
$form = array();
if ( $xn > 0 && is_object( $f ) ) {
for ( $xi = 0; $xi < $xn; $xi++ ) {
Expand Down

0 comments on commit 137443c

Please sign in to comment.