Trying to hide some fields from edit record
-
Hello,
I needed to add some admin only fields – which I would have preferred to be “record” fields like MFA hash and expiry. These are admin only. However these seem to – as expected – display when I open the record for editing with the [pdb_record groups=”main,admin”]. I created a pdb-record-edit.php under the /public_html/wp/wp-content/themes/colormag-hvrcf/templates where my other customizations are and it does not seem to take effect. The code I tried is:
fields as $field ) {
if ( in_array( $field->name, [ ‘mfa_code_hash’, ‘mfa_code_expiry’ ] ) ) {
continue;
}
echo $this->display_field( $field );
}Please let me know how can these 2 fields be hidden if that is even possible.
Thank you.
The topic ‘Trying to hide some fields from edit record’ is closed to new replies.