Customise property enquiry form fields
To customise the fields shown within the property enquiry form we have a filter that can be used as such:
add_filter( 'propertyhive_property_enquiry_form_fields', 'add_enquiry_field_form', 10, 1 ); function add_enquiry_field_form( $fields ) { $fields['my_custom_field'] = array( 'type' => 'select', // text / textarea / date / select / hidden / checkbox / radio 'label' => __( 'My Custom Field', 'propertyhive' ), 'show_label' => true, 'before' => '<div class="control control-my-custom-field">', 'required' => true, // true/false 'options' => array( // only applicable when 'type' is 'select' or 'radio' 'Option 1' => 'Option 1', 'Option 2' => 'Option 2', 'Option 3' => 'Option 3', ) ); return $fields; }
Once the enquiry form is submitted the value entered should automatically come through on the email and be added as part of the enquiry details recorded inside Property Hive.