WP Configurator Pro

⌘K
  1. Home
  2. WP Configurator Pro
  3. Adding Custom Fields to the Configurator Quote Form

Adding Custom Fields to the Configurator Quote Form

The Configurator Quote Form supports additional custom fields such as:

  • Text fields
  • Textareas
  • Radio buttons
  • Dropdown/select fields

This can be useful for collecting extra customer information like project details, budget range, preferred installation date, product specifications, or any custom requirements.

Step 1 — Add the Custom Fields Code

To add additional fields to the Configurator Quote Form, you must use a custom snippets plugin or add the code through your theme’s functions.php file.

Add the following code using:

  • A custom snippets plugin (recommended)
  • Or your child theme’s functions.php file

Example path:

/wp-content/themes/your-child-theme/functions.php

Complete Example

add_action( 'init', function() {

$fields = array();

// Text Field
$fields[] = array(
'id' => 'custom_field_1',
'name' => esc_html__( 'Custom Field 1', 'text-domain' ),
'placeholder' => esc_html__( 'Custom Field 1', 'text-domain' ),
'type' => 'text',
'required' => true,
);

// Textarea Field
$fields[] = array(
'id' => 'custom_field_2',
'name' => esc_html__( 'Custom Field 2', 'text-domain' ),
'placeholder' => esc_html__( 'Custom Field 2', 'text-domain' ),
'type' => 'textarea',
'required' => true,
);

// Radio Field
$fields[] = array(
'id' => 'custom_field_3',
'name' => esc_html__( 'Custom Field 3', 'text-domain' ),
'placeholder' => esc_html__( 'Custom Field 3', 'text-domain' ),
'type' => 'radio',
'options' => array(
'opt1' => esc_html__( 'One', 'text-domain' ),
'opt2' => esc_html__( 'Two', 'text-domain' ),
'opt3' => esc_html__( 'Three', 'text-domain' ),
),
);

// Select Dropdown Field
$fields[] = array(
'id' => 'custom_field_4',
'name' => esc_html__( 'Custom Field 4', 'text-domain' ),
'placeholder' => esc_html__( 'Custom Field 4', 'text-domain' ),
'type' => 'select',
'options' => array(
'' => esc_html__( 'Choose Option', 'text-domain' ),
'opt1' => esc_html__( 'One', 'text-domain' ),
'opt2' => esc_html__( 'Two', 'text-domain' ),
'opt3' => esc_html__( 'Three', 'text-domain' ),
),
'required' => true,
);

new WPC_Quote_Form_Custom_Fields( $fields );

});

How can we help?