How to remove required field validation from Front End Car Submission form?
You can use the following filter code in the child theme functions.php file to disable the required field validation.
add_filter( 'cdfs_form_required_fields', 'cardealer_child_extend_cdfs_form_required_fields' ); function cardealer_child_extend_cdfs_form_required_fields( $fields ) { // Add your code below to update fields. // Your code goes here. // Set $debug to true to show validate fields array. $debug = false; if ( $debug ) { echo 'fields: <pre>'; print_r( $fields ); echo '</pre>'; } // Make changes in the $fields array to set required fields. return $fields; } add_filter( 'cdfs_car_required_fields', 'cardealer_child_extend_cdfs_car_required_fields' ); function cardealer_child_extend_cdfs_car_required_fields($fields){ // Add your code below to update fields. // Your code goes here. // Set $debug to true to show validate fields array. $debug = false; if ( $debug ) { echo 'fields: <pre>'; print_r( $fields ); echo '</pre>'; } // Make changes in the $fields array to set required fields. return $fields; }
Important Note: The above-provided code is a sample code. You will have to make necessary changes in it to make it work.