Since: 1.0 Last Updated:
Back to Main Index

get_incremental_options() is one of 5 default helper functions defined in the Layers_Form_Elements class, used specifically for defining the title and excerpt or header section of a form or widget.

Location: /core/helpers/forms.php


  • $options – Existing option array if exists (optional)
  • $min – Minimum number to start with
  • $max – End point, included in the options with <=
  • $increment – The increment to add to each number


This function is a great helper which allows us to easily put together numbered options for a select input.

Here’s an example of how we’ve used this function to add a drop down allowing users to select up to 10 posts to display in a form.

The above will output the following HTML: