Please try this snippet instead, I haven’t tested it locally but it should block the Title and Location fields and make them read-only:
add_filter(
'hivepress/v1/forms/listing_update',
function( $form ) {
$form['fields']['title']['readonly']=true;
$form['fields']['location']['readonly']=true;
return $form;
},
1000
);
add_filter(
'hivepress/v1/forms/listing_submit',
function( $form ) {
$form['fields']['title']['readonly']=false;
$form['fields']['location']['readonly']=false;
return $form;
},
1000
);