Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Shows how to set the readonly status of a Participants Database field based on the field data
// set the first_name field to read only
add_filter( 'pdb-before_field_added_to_iterator', function ($field) {
/** @var PDb_Field_Item $field */
if ( $field->name() === 'first_name' ) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment