wpmem_register_form_rows

Description

Filters the form rows before they are put together for the form.

Parameters

$rows
(array) (required) An array of the forms row elements.  Each row element will include the following keys:

  • order – the field order (currently not used)
  • label_text – the raw text for the label (static)
  • type – The field type (i.e. text, checkbox, dropdown, textarea)
  • value – The field value (only populated if error state or profile edit)
  • values – The possible values for the field (dropdown select, multiple select/checkbox, radio group) – 3.1 and higher only
  • row_before – HTML tags before the row
  • label – HTML label tag
  • field_before – HTML tags before the field input tag
  • field – HTML input
  • field_after – HTML tags after the field input tag
  • row_after = HTML tags after the row

$tag
(string) (optional) Indicates the form that is being displayed (new|edit).

Usage

[snippet slug=wpmem_register_form_rows lang=php]

Notes

Changelog

Introduced in version 2.9.0
Added “label_text” key in 3.0.9
Added “values” key in 3.1.0
Deprecated “order” key in 3.1.2

Source

wpmem_register_form_rows is located in includes/class-wp-members-forms.php

Scroll to Top