Hi,
I want to hide a field on the listing update form so I used this snippet to unset the attribute:
add_filter(
'hivepress/v1/forms/listing_update',
function( $form ) {
unset($form['fields']['my_attribute']);
return $form;
},
1000
);
But since listing_submit
inherits from listing_update
it is also hidden on the submit page which is an unwanted result. I can not figure out what snippet to use to add it back via hivepress/v1/forms/listing_submit
.
Maybe I should add a condition to check the page or form? If yes, how should I do that best?
Any help to disable the field in the proper way is welcome
Thank you!