Search Documentation

WP Travel Developer Documentation

  1. Home
  2. Docs
  3. WP Travel Developer Documentation
  4. Filters Associated With Enquiry
  5. Filter :wp_travel_enquiries_form_fields

Filter :wp_travel_enquiries_form_fields

Trip enquiry form field filter.

Source

File: /inc/trip-enquiries.php
Used by: /inc/trip-enquiries.php

Parameters
$enquiry_fields

Example:

function prefix_wp_travel_enquiries_form_fields( $enquiry_fields ) {
    $enquiry_fields[‘phone_no’] = array(
    'type' => 'number',
    'label' => __( 'Phone Number',
    'wp-travel' ),
    'name' =>
    'wp_travel_enquiry_number',
    'id' =>
    'wp-travel-enquiry-number',
    'placeholder' => __( 'Enter your
    Phone number', 'wp-travel' ),
    'validations' => array(
    'required' => false,
    'maxlength' => '80',
    ),
    'attributes' => array(
    'placeholder' => __( 'Enter
    your Number', 'wp-travel' ),
    ),
    'priority' => 100,
    ),
    return $enquiry_fields;
}
add_filter( 'wp_travel_enquiries_form_fields', 'prefix_wp_travel_enquiries_form_fields' );
Was this article helpful to you? Yes No

How can we help?