Kirki: Set a limit of repeater rows?

Created on 1 Mar 2016  路  8Comments  路  Source: kirki-framework/kirki

Hey,

Is it possible to set a limit of how many repeater rows you can add? And maybe even a lower limit? So that you, for example, can't remove fields so that the amount is less than 2 and can't add so that the amount is higher than 6.

feature help wanted

Most helpful comment

P.S. I hope that I did not disturb you.

No bother... I was working on it anyway. :+1:
I really appreciate any bug reports... It's what helps this plugin get better every day.

@gustafguner @x-bull @BeFiveINFO This has now been implemented and I'm about to release version 2.2.4 that will include it.
To add a limit to repeater controls, you can add the following:

'choices' => array(
    'limit' => 3
),

3 being of course the number of rows you want to allow.

All 8 comments

Hey there!

Unfortunately this is not something we considered when building this control...
Everything's possible, so I'm marking this one as a feature request for a future version. :+1:

I am missing this feature too :+1:

Hello!

I have a question, I am trying to use the repeater and I just encountered with the following warning:

Notice: Undefined index: limit in ...wordpress/wp-content/plugins/kirki/includes/controls/class-kirki-controls-repeater-control.php on line 95
Limit: rows

Is this related to the change above perhaps?

Yes, it's still a work in progress...
I'm currently working on a bugfix for that, I'll push it in a few minutes. :)

@BeFiveINFO try pulliing the develop branch now, this should be fixed.

Thank you :)
P.S. I hope that I did not disturb you.

P.S. I hope that I did not disturb you.

No bother... I was working on it anyway. :+1:
I really appreciate any bug reports... It's what helps this plugin get better every day.

@gustafguner @x-bull @BeFiveINFO This has now been implemented and I'm about to release version 2.2.4 that will include it.
To add a limit to repeater controls, you can add the following:

'choices' => array(
    'limit' => 3
),

3 being of course the number of rows you want to allow.

Thank you :) . :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rahulv3a picture rahulv3a  路  3Comments

MapSteps picture MapSteps  路  6Comments

stylethemes picture stylethemes  路  6Comments

daviedR picture daviedR  路  6Comments

hellor0bot picture hellor0bot  路  3Comments