• Hi,
    Hope you’re safe and well.

    I have one general form for inquiries but need to make a second option with other fields for custom product type made with CPT UI plugin. I need this NEW field to be independent of the default form and to use seperatley with its own custom fields.

    I’m not sure this is correct, but I found a tip on the wc lovers site and copied the template/ wc-frontend-manager/views/enquiry with file wcfm-view-enquiry-form.php but I cannot get it to work.

    Can you help me add a field to make a second inquiry form only for a custom post type / category : In my case it is OFFERS.
    Thanks ??

    case 'multi-select':
    //$WCFM->wcfm_fields->wcfm_generate_form_field(  array( $wcfm_enquiry_custom_field['name'] => array( 'label' => __( $wcfm_enquiry_custom_field['label'], 'wc-frontend-manager') , 'name' => $field_name, 'type' => 'type', 'class' => 'wcfm_product_type', 'label_class' => 'wcfm_title', 'value' => $field_value, 'hints' => __( $wcfm_enquiry_custom_field['help_text'], 
    'wc-frontend-manager') ) ) );
    break;   
    case 'multi-select':
    $select_opt_vals = array(); $select_options = explode( '|', $wcfm_enquiry_custom_field['options'] );
    if( !empty ( $select_options ) ) {
    foreach( $select_options as $select_option ) {if( $select_option ) {
    											$select_opt_vals[$select_option] = __( ucfirst( str_replace( "-", " " ,
     $select_option ) ), 'wc-frontend-manager');
    					}
    				}
    			}      
    $WCFM->wcfm_fields->wcfm_generate_form_field(  array( $field_id => array( 'label' => __( $wcfm_enquiry_custom_field['label'], 'wc-frontend-manager') , 'name' => $field_name, 'custom_attributes' => $custom_attributes, 'type' => 'select', 'class' => 'wcfm-select wcfm_popup_input', 'label_class' => 'wcfm_title wcfm_popup_label', 'options' => $select_opt_vals, 'value' => $field_value, 'hints' => __( $wcfm_enquiry_custom_field['help_text'], 'wc-frontend-manager') ) ) );
    break;
                           }
    		    }
    		}
    		?>			
                        
    
    • This topic was modified 4 years, 1 month ago by marzmuso.
  • The topic ‘Inquiry Form 2- With Select Custom Post Type Field’ is closed to new replies.