Input Helpers

(Since 1.6.4) -- customize the appearance of an input field
An Input Helper lets you completely customize the appearance of any input field.
The default input field code is generated from: /plugins/pods/ui/input_fields.php

Create an Input Helper

  1. Go to Pods > Setup
  2. Click on the "Helpers" tab
  3. Click on the blue "Add new helper" button
  4. Give your helper a name (alphanumeric and underscores only)
  5. Select "Input" from the dropdown, then hit Save
  6. Add some helper code into the subsequent textarea, then hit Save

How to Assign

  1. In "Manage Pods", there is a dropdown under "Pod Settings" when selecting the pod of your choosing.
  2. When using the publicForm function, you can manually choose an input helper to use (see examples)

Available Variables / Data

  • $name - The column name
  • $value - The column's value (if editing, or if default is set)
  • $coltype - The column's type
  • $coltype_exists[$coltype] - Can be used to check if a column has been used more than once, useful for when needing to include a function / script / css
  • $hidden - If a column is hidden or not
  • $comment - The column's comment
  • $css_id - The column's css ID, used with label / form element
  • $field - An array of all settings related to the current column, as found in wp_pod_fields
For PICK Columns
  • $field['multiple'] - Value is 1 if allowed to pick more than one, otherwise it is 0
  • $value - Contains an array of the available rows from the related PICK column's Pod
  • $value[$index] - In this case, $index is the array key of the item, $index is not a usable variable, it's only used as an example in this context
  • $value[$index]['id'] - The ID of the Pod item
  • $value[$index]['name'] - The name of the Pod item
  • $value[$index]['active'] - If not empty, the current Pod item has been selected
  • $value[$index]['other_column_name'] - Other columns from the Pod are available, just not the Pod's PICK columns themselves

Examples

Disable a text field

We're simply copying TEXT field code from ui/input_fields.php and adding the "disabled" HTML attribute.