1. Home
  2. Knowledge Base
  3. WooCommerce Request a Quote
  4. Getting Started
  5. Adding address fields to the quote request form
  1. Home
  2. Knowledge Base
  3. WooCommerce Request a Quote
  4. Adding address fields to the quote request form

Adding address fields to the quote request form

If you’d like to add some fields to the quote request form, you can modify this snippet:

<?php
/**
* Add extra fields to quote form
*/
function prefix_add_quote_fields( $fields ) {
$fields['province'] = array( // Update the key here
'type' => 'text', // This will add a text field
'label' => 'Province', // Update the label here
'required' => true, // Set whether this field is required
'placeholder' => 'Province', // Update the placeholder text here
);
return $fields;
}
add_filter( 'wcraq_quote_fields', 'prefix_add_quote_fields' );

Here’s how to add the snippet.

Was this article helpful?

Related Articles