How to Change WC Fields Factory Custom Product Field’s Rendering Behavior

As you already aware that WC Fields Factory is a WordPress plugin to add custom fields to Woocommerce product page, to get additional information from users while adding products to cart.

WC Fields Factory allows you to add as much as fields you need, and also it allows you to add rules to which fields groups belongs to which products. Ok that’s cool you can do everything by using initiative UI, no need to touch your code or templates.

By default WC Fields Factory render custom fields to product page with the following template structure and css classes.

/* Skeleton for Fields 1 start */
<table class="wccpf_fields_table variations">
	<tbody>
		<tr>
			<td class="label"><label for="">/* Fields Label */</label></td>
			<td class="value">/* Actual Field */</td>
		</tr>
	</tbody>
</table>
/* Skeleton for Fields 1 end */

/* Skeleton for Fields 2 start */
// go on and on ...

Well this good for most of the scenarios.
What if you wanted to change the way the WC Fields Factory rendering those custom fields.?

Yes you can, You can override the way your custom fields rendering on product page by using wccpf/before/field/rendering and wccpf/after/field/rendering actions. WC Fields Factory trigger these actions before and after rendering each custom fields.

You can add handlers for these action and render the skeleton the way you want, something like this

function your_before_rendering_handler( $name, $label ) {
	echo '<div class="your-custom-class">
 			<label class="label-class" for="'. $name .'">'. $label .'</label>';
}
add_action( 'wccpf/before/field/rendering', 'your_before_rendering_handler', 5, 2 );

function your_after_rendering_handler() {
	echo '</div>';
}
add_action( 'wccpf/after/field/rendering', 'your_after_rendering_handler', 5 );

Customize though CSS
Here is the complete css classes used by WC Fields Factory, copy the below css classes to your style.css and modify according to your theme.

/* Whole container */
.wccpf-fields-container {}
/* Individual group container */
.wccpf-fields-group {}
/* Group Title */
.wccpf-fields-group h4 {}
/* Fields Table */
table.wccpf_fields_table {}
/* td which contains Label */
table.wccpf_fields_table td.wccpf_label {}
/* td which contains Field */
table.wccpf_fields_table td.wccpf_value {}
/* Label field */
table.wccpf_fields_table td.wccpf_label label {}
/* Asterik span - used for required field */
table.wccpf_fields_table td.wccpf_label span {}
/* Actual fields */
table.wccpf_fields_table td.wccpf_value select,
table.wccpf_fields_table td.wccpf_value textarea,
table.wccpf_fields_table td.wccpf_value input[type=text],
table.wccpf_fields_table td.wccpf_value input[type=email],
table.wccpf_fields_table td.wccpf_value input[type=number] {}

Leave a Reply to Saravana Kumar K Cancel reply

Your email address will not be published.

 

95 Comment(s)

  1. Akash Shaw March 17, 2022

    first thank you for crating the plugin, super easy to use yet i want can we change the interface how its look to viewer, like i dont want the cell line , if you can help that will be good

    1. Saravana Kumar K March 18, 2022

      Yes, it is possible, simple css override would do the tricks. pls share your product page url, I will send you the appropriate css snippet.

  2. Claes March 14, 2022

    Thanks for a great plugin. I would like to set the default value of a added product text field based on a dynamic variable from WordPress. In my case the variable comes from a QR-code (URL) the user scans. Is that possible by applying a filter? If yes, can you point me in the right direction on how to set/change the default value of a input field on rendering.

    1. Saravana Kumar K March 19, 2022

      There is no inbuilt filters available, you might be achive this by following updates.

      add the following lines to the file “/wp-content/plugins/c-fields-factory/includes/wcff_injector.php” LN : 194

      if (has_filter('wccpf_field_meta')) {
      $field = apply_filters('wccpf_field_meta', $field, $this->get_product_id($this->product));
      }

      and then add the below snippet in yout theme’s functions.php

      function override_default_value($_field, $_pid) {
      /* Change the product id value to meet your requirement */
      if ($_pid == 122) {
      $_field["default_value"] = "Your updated value";
      }
      return $_field;
      }
      add_filter("wccpf_field_meta", "override_default_value", 10, 2);

  3. kirill January 13, 2022

    Fatal error: Uncaught Error: Call to undefined function do_filter() in /var/www/itpolice_main/data/www/db20.itpolice.ru/wp-content/plugins/wc-fields-factory/includes/wcff-builder.php:1442 Stack trace: #0

    do_filter ?????????

  4. DENISE M CONNER February 7, 2019

    Is this still the complete list of CSS? If not, where would this be found?

  5. Matthew Loeffler December 26, 2017

    Is there a way to dynamically display what the user types in the field and have it show on the actually product. Like a name on a shirt. Like a visual proof?

    1. Saravana Kumar K December 28, 2017

      That is doable, needs some JS and css, also all your t shirt images has to be exact size.

      1. Inject a span tag on top of every product images and assign some id for that tag, you will have to position that using appropriate CSS.
      2. Write a JS snippet which will update the text that user enters on the text box into the span tag
      something like this

      (function($) {
          $(document).on("keyup", "input[name=your_text_field_name]", function() {
              $("#your_span_id").html($(this).val());
          });
      })(jQuery)
      
  6. Mark December 15, 2017

    Thanks for the plugin. I think I must be missing something really obvious but I would like to know how I can only display text fields when they are populated by the product info.
    I have over 50 custom fields because there is 500 products but most products would only have info for 4 fields so then I end up with 50 fields showing nothing. here is a page as an example. http://www.bunda.blirtcreative.com/product/square-cushion-cut-diamond/

    1. Saravana Kumar K December 17, 2017

      Each Product Fields post (or Admin Fields post) is essentially act as group. You can create as many group as you want and each group can have their own rule (rules that defines where these fields has to be displayed), like show these fields only for the product that has particular category, tags or types. Even you can assign fields only for a particular product.

      And I am not sure You have used Admin Fields instead of Product Fields.

  7. Nando November 2, 2017

    Hi Kumar, thank you for this great plugin.
    I’ve an important (at least to me) issue: i created 2 different fields group that i want to display in 2 different columns (placed side by side) on the same product.
    i’m having a look at html code, but i see that every field is contained into a element, but i’ve no clue on how to distinguish a field of fieldGroup1 from another of FieldGroup2. Thus i don’t know how to style them to have them in 2 columns.

    How can achieve that?
    Thank you in advance.

    1. Saravana Kumar K November 8, 2017

      Hi, you can achieve this by CSS, use the following css classes

      .wccpf-fields-group-1 {
         /* Place your style first group */
      } 
      .wccpf-fields-group-2 {
         /* Place your style for second group */
      } 
      

      This can go as much as group you have ( Group means different Product Field’s Post )

  8. Jim October 31, 2017

    Hi! This is a great plugin! I’m also using it to add buttons to my product pages. My problem is that not all products will have links for all buttons. Is there a way to hide the button on the product page if no URL has been entered?
    Thanks!

    1. Saravana Kumar K November 8, 2017

      Good option, I will include it in my next release

  9. Sarah Justice October 17, 2017

    I’m trying to setup a Select field and the text in the dropdown is missing/hidden. I’ve tried changing the CSS and nothing has changed.
    Any pointers?

  10. M Kabir October 11, 2017

    First of all thanks a lot fo this wonderful plugin! Just wanted to know whether can I use condition to show a value from a dropdown box on selecting a particular date from the date picker. Please reply I would really be grateful to you.

  11. Ralf Behrendt September 12, 2017

    Hi, how can I archive to display admin fields in the cart and the loop. I was able to show the admin fields in the product page, but nothing works for the cart. I like to display only the values of the admin fields or to change the standard output from the plugin, but can’t find a way that works. Example: I have sales persons related with the products. So I have Anna related with a sports product. I like to display her name in the cart and in the loop. Any hint for me? The name is choosed in the admin area of your plugin as an admin field. Thank you.

  12. nnl August 30, 2017

    Hi there! I’ve added customs admin fields to the category. How can I display them on the category page? Thank you!

  13. Mike August 25, 2017

    Hello I am using a plugin Woo Invoices (need Sliced Invoices to work) the meta data for my products from your plugin don’t not transfer. I assume this is because they are only bring over product variation data attributes and not all meta data.

    Is there anyway to attach the meta data of multiples fields from your product into one variation attribute on the product itself?

  14. Mark MacAllister August 12, 2017

    This plugin is working pretty well and I’m very impressed! Quick question: Is there a way to use CSS to style fields of the type “Label”? I may be missing something painfully obvious, but I would like to change the default dark-blue-on-light-blue that is now being used. Please see for example

    https://staging1.nczoosocietystore.com/product/family-membership/

    Thanks for any help you can provide.

  15. abner maldonado August 9, 2017

    Hi, I just bought the plug in and i added a text custom field, but it does not display on the cart nor on the check out pages. can you please help!

  16. Danish August 6, 2017

    Hi,

    I want to hide the times from the select dropdown if that is already exists in the order for a particular date in woocomeerce orders. I have one date field and two time fields as a dropdown. Please guide me how can I update this.

    Regards,
    Danish

  17. Bruce July 28, 2017

    Love the plugin and I have been using it on a few sites. However I recently ran into two issues that I need your help with please:

    1. Admin Field Group showing in two locations:
    The Admin field group data is showing in two locations:
    https://solarlight.com/product/150-watt-xenon-arc-lamp/
    a. Below price: If a price is added, it shows below the price as fields, even though I have it setup to only show as values and within the “product tab config”. However if I dont have a price on a product, then it doesnt show the fields. After adding custom fields (over 300+) to over 100 products, we finally turned the price on for one and seen this. HELP!

    b. Within the “technical details tab” per your plugin settings “Product tab config”. This location is what we want and is fine.

    How can we get this to stop showing below the price area entirely?

    2. WOOCOMM ATTRIBUTES not showing:
    We added attributes setup on a few products and noticed its not showing on the product page. I had the theme author review and they found when your plugin is turned off, only then will it display the attributes.

    Your timely help on this is greatly appreciated!

  18. Cody July 21, 2017

    Is it possible to add 2 products to the cart simultaneously, both with different custom product fields? I’d like to have a product, where if the customer chooses to have it setup for them beforehand, there would be a 2nd product sent to the cart representing an additional service fee for setup. Thank you very much for your help and support.

  19. GruffGamer June 10, 2017

    I’m a bit confused on how to implement the rendering code; I can tell that I need to rename “your_before_rendering_handler” and “your_after_rendering_handler” and the classes, but I don’t know what to rename the handlers to. If I try to use it as-is, I get this error where the forms appear:

    “Warning: Missing argument 2 for before_rendering_handler(),”

    All I want to do is change the container for the label and value to divs rather than tables to avoid formatting issues that tables bring. Can you give a more specific example that works out of the box, or at least a specific list of handlers I can use to achieve this? I just want a simple end result like this:

    Label: Value

    Without all the extra tables, td, tr, etc and padding. A single container div would work for me, I can use spans for styling.

  20. M Reilly May 31, 2017

    Hello! Im wondering if you can help me. Im interested in the portion that allows for customizing the output of a custom field. My intent is to add a field that allows the user to view some custom html in regards to ordering, based on product category. So Im trying to use this, but not sure Im working it in correctly. The field Im choosing to use is a label. Other than my own field id in this script, what else should replace?

    function your_before_rendering_handler( $name, $label ) {
    echo ‘
    ‘. $label .”;
    }
    add_action( ‘wccpf/before/field/rendering’, ‘your_before_rendering_handler’, 5, 2 );

  21. Gert May 16, 2017

    Hi!
    Useful plugin but we have some issues. It did worked OK, but it was version 1.1.3 and utf8 was not supported. So I updated it and something went wrong. Got some errors and plugin went off. Turned it on again, it seemed to be working correctly, but now on the product page I have weird things, look http://www.puri.ee/toode/estlys-moodukirja-tellimine/ . Scroll down a little and you’ll see that theres some “Array” strings printed on page and lots of fields are doubled. Like script is repeating many times.
    I copied old files back, but no changes.
    Can you please tell me where the problem can be or where is the code that renders those fields to the page? I need it to be fixed ASAP, clients are complaining 🙁

    Best regards,
    Gert

  22. DENISE M CONNER May 9, 2017

    Love this! Thank you so much.

  23. Matt Hartwell May 8, 2017

    Hi,

    Handy little plugin this one. Wondering if you can help me. I have created 3 extra fields in the general tab of my woocommerce products. They are all designed to take a URL, which varies depending on the product. I actually want to output that URL on single product listings, wrapped into a button. So when a user clicks on the button it goes to the URL’s I have input in the backend.

    Any help mightely appreciated

    Regards
    Matt

    1. Saravana Kumar K May 8, 2017

      Hi, seems to be an useful option, we will include this as an option with an upcoming release, there is one new release coming within a week or two. stay tunned.

  24. Juan March 25, 2017

    Hi! Congratulations for this plugin, looks very usefull.
    I have 2 questions:
    1- I m using a datepicker but when I select to use also time picker top of table can not be accesible so month can not be changed. I been trying to increment padding but have not find the way to do it
    2- Can I change minute picker not every minute but every 30 minuts and only allow to select from 9 hours to 20 hours?

    Regards and thank in advance.

  25. Michele March 17, 2017

    I’m curious is there is a way to, instead of using product, product tag, product category, or product type – is there a way to create a condition for something like “if the description contains xxx” then display this? Or another option that would be invisible to a customer?

  26. Aaran February 22, 2017

    Hi there. Great plugin, but I’m using the “WooCommerce Single Product Page Builder” plugin to allow a custom product page layout.

    I can’t get the Fields Factory fields to display.

    An example product page is here: http://rankin.devtserver.co.uk/product/dpe-epc-energy-reports/

    Can you please advise me on how to resolve this issue?

    Thanks and regards,
    Aaran

    1. Saravana Kumar K March 5, 2017

      The fix has been released with V 1.3.6 onwards

  27. Jesse February 21, 2017

    Hi Saravana,
    Thank you for the great plugin. I am trying to style the label and text area to be on separate lines, one above the other. I have tried all of the solutions in your support forum.

    I tried the above code for the functions page.

    function your_before_rendering_handler( $name, $label ) {
    echo ‘
    ‘. $label .”;
    }
    add_action( ‘wccpf/before/field/rendering’, ‘your_before_rendering_handler’, 5, 2 );

    function your_after_rendering_handler() {
    echo ”;
    }
    add_action( ‘wccpf/after/field/rendering’, ‘your_after_rendering_handler’, 5 );

    I get this error code:

    Warning: Missing argument 2 for your_before_rendering_handler() in /home/content/60/8825060/html/barkender/wp-content/themes/twentyseventeen-child/functions.php on line 52

    I changed “your-custom-class” but I am not sure what I am doing wrong

    I tried changing the table on the meta_box_fields.php in the plugin editor.

    I also tried:

    table.wccpf_fields_table {
    clear:both;
    }

    I feel that this should be an easy fix. I must be missing something.

    Thank you for your time.

  28. adarshini February 8, 2017

    Thanks for the excellent plugin. I’m trying to do some layout changes for elements How to add through functions.php

    please help me in yhis

  29. abc January 26, 2017

    hi, How Can I get Product Filde on quick view popup.

  30. steven smith January 17, 2017

    Hello! Awesome plug in as it really helps what i am doing re putting together a shop but i am getting the “This field can’t be Empty
    This field can’t be Empty” errors (2 at the same time) . I have looked at most settings bit am drawing a blank.

    (this is a woopress site. when i try and add anything into the basket i get these errors.

    Many thanks! 🙂

    steve

  31. Jeff January 13, 2017

    Hello,

    Thanks for the excellent plugin. I’m trying to do some styling of the field display. I’ve copied the css classes to my theme options file and am trying to change the background color of the label area. I haven’t been successful. It defaults to a light blue with blue text. Can you please direct me?

    Thanks,
    Jeff

    1. Jeff January 13, 2017

      I found the class and added the selectors to CSSHero.
      .wcff-label
      . wcff-label-info
      Thanks,
      Jeff

  32. Derrick January 1, 2017

    Greetings,

    How do I get my custom field to show up on my product listing page, and get to export with all other product data?

    Thank you

  33. NESTOR RENTAS December 21, 2016

    Great Product!

    Is their a way to clone based on product variation instead of product amount?

  34. Kelly December 14, 2016

    When a customer puts text in the field with an apostrophe it is changing it to a backslash. Should be Kelly’s and it is rendering it Kelly\’s. Is there a way to correct this?

  35. Dan December 8, 2016

    Classes are not populating withing each field factory field. Please advise.

  36. Ty November 15, 2016

    I love this plugin. I am currently using it to add a custom name to each product order.
    However, I am looking to Append a checkbox after the fields have been rendered into the meta data on the product order.

    I am unsure where to make this change to have this affect. Can you help?

  37. Pobb October 24, 2016

    Hi Saravana, great plugin.

    I need to insert an onchange event on my select element. I can edit the plugin but obviously don’t want to so how can I achieve this with hooks in functions.php?

  38. jino October 12, 2016

    Hi Saravana, for the upload file field, is there any way to set the limit of each file size to max 2mb? My fields enabled with cloning and I would like to set the limit to each group cloned.

    Btw, I’ve set my site upload_max_filesize to 128M but when I tried to upload a 4.3mb file it couldn’t go through. When tried with a 3.5mb file it is ok. Hope you could advise on the problems. Thank you.

  39. Jose Silva October 8, 2016

    Hi! Great Plugin! I wanted to know if there was some way I could add 3 fields like in one group of “travelers” for example: name, birth date and id like in a table adding rows according to the necessity. Thanks

  40. Ine De Cubber October 5, 2016

    Hi,
    first of all, thank you for this great plugin! I already managed great things with it, it’s clear and easy to use!
    On my productpages, I added two product field groups to each product.
    One product field group “instructions” has to be repeated for each product, another only for specific categories (therefor I worked with two product field groups).
    Now the question, how can I change the order of the product field groups? (not the order of the product fields INSIDE the group, this I can do).
    I hope you can help me out!
    with kind regards,
    Ine De Cubber

  41. Andrew October 4, 2016

    First off, your plugin saved me a ton of headache with custom jersey orders on our site. However, when we fulfill many, I’d rather not view each order by itself and then manually write each one down.

    Is it possible to be able to export orders with each different field as a column?

    I have many orders and I would like to be able to easily sort their responses.

    Thanks.

  42. Simon Guilliard August 11, 2016

    Can you tell me which variable/array holds the title of the ‘WC Product Field Groups’? From what i can see there are two separate prefixes used in the database (wccpf & wccaf), and I assume that these titles will have the wccaf prefix which hopefully can be retrieved with the ‘wcff/load/all_fields’ filter?

    1. Saravana Kumar K August 28, 2016

      Hi this option is available from WC Fields Factory Setting page itself ( V 1.3.5 ). however if you wanted to do it manually here you go

      $product_fields = apply_filters( 'wcff/load/all_fields', $product->id, 'wccpf' );		
      //$admin_fields = apply_filters( 'wcff/load/all_fields', $product->id, 'wccaf' );		
      foreach ( $product_fields as $title => $fields ) {
          echo $title;
      }
      
  43. Simon Guilliard August 11, 2016

    OK, I will edit the code directly and wait for update

    1. Saravana Kumar K August 28, 2016

      Hi this option has been available from V1.3.5, please update and check. ( you will have to turn Show Group Title option Yes on Fields Factory -> Settings )

      1. Nando November 2, 2017

        Hi, the option “Show Group Title” doesn’t work on mine. Version 1.4.0.

        Could you please help me?

  44. Simon Guilliard August 4, 2016

    I would like to know the very same thing. How can I show different ‘WC Product Field Groups’ names?

    1. Saravana Kumar K August 6, 2016

      Hi for that you will have to modify the plugin itself. I too have been thinking about that option for some time, probably it’s right time to include on my next release, I will let you know once my next release is ready

  45. Ines June 15, 2016

    Hi! Congratulations for this plugin, it’s a great idea.
    But something wrong is happening to my site. I’ve created a couple of custom fields (a text area and a datepicker) and it’s not working. When I go to checkout page, it always gives me a price of 0. And also date picker is not shown. I also see firebug errors. Can it be an incompatibility wtih my theme? If I deactivate plugin everything works fine. Could you please have a look?
    http://www.barcelonacyclingcenter.com/tours/forat-del-vent-y-tibidabo/#maresme-book

    1. Saravana Kumar K June 15, 2016

      Hi, I saw that too that there is some jQuery related error has been showed.

      the theme you are using, does it custom build theme.? does the theme has wp_head(); in the header.php and wp_footer(); in the footer.php

      Because I am not able to see styles and scripts related with WC Fields Factory plugin ( enqueued by this plugin )nothing is there.

      What is the version of WC Fields Factory you are using.?

    2. Saravana Kumar K June 15, 2016

      Hi, are you creating that page via shortcode.?
      they are not default woocommerce product template right.?

      if that is the case, go to

      WPPLUGIN/wc-fields-factory/classes/wcff-product-form.php LN : 760 remove that if condition and try again.

  46. Gio April 25, 2016

    I currently only have one text field on a simple product and the woocommerce quantity selector is right next to the field.

    How can I insert a line break so that the custom field is on a line of its own?

    Here is a screenshot to show you:

    https://www.dropbox.com/s/bwf9sxapy6ht4u1/Screenshot%202016-04-24%2005.52.07.png?dl=0

    1. Saravana Kumar K April 25, 2016

      Hi, You can achieve this by css itself. put the following style on your style.css

      table.wccpf_fields_table {
          clear:both;
      }
      
  47. Brent February 18, 2016

    Where are these values stored in the database if I want to retrieve them for reporting?

    1. Saravana Kumar K February 18, 2016

      Hi, these values will added as order item meta
      you can access these meta like this

      $items = $order->get_items();
      foreach ($items as $item ) {
      	if ( !empty($item['Your Field Label']) ) {
      		echo $item['Your Field Label'];
      	}
      }
      
  48. Micah February 9, 2016

    Hello,

    I am trying out your form software. When I fill out a form and leave a field incomplete, it reloads the page as I was expect and tells me that I missed a required field.

    The problem is that on the page reload, the form is now empty and nothing is highlighted as to what wasn’t filled in.

    How can I fix this form validation so that it remembers what was filled in and specifically highlights the empty required field?

    Thanks,

    Micah

    1. Saravana Kumar K February 9, 2016

      Hi, There is a fix available with my up coming release ( by the end of this week ), I have implemented Client side validation, so that you won’t have this problem any more.

  49. Shreya December 18, 2015

    Hi!

    Great Plugin! I wanted to know if there was some way I could add a “retype email/confirm email” field in the plugin. I want to ensure that the customer has entered the correct email.

    Thanks!

    1. Saravana Kumar K December 22, 2015

      Hi,

      This functionality is not available by default, but you could do this with the help of little bit JS ( or jQuery )
      Here is a way how you could achieve this

      Add two email fields one for actual email and another for confirm email, and add the following JS snippet to your footer.php

      <?php if( is_product() ) : ?>
      
      <script type="text/javascript">
      (function($) {	
      
      	$(document).ready(function(){
      		$("form.cart").on( "submit", function() {
      			var email_field = $("input[type=email][name=your_email_field_name]").val();
      			var confirm_email_field = $("input[type=email][name=your_confirm_email_field_name]").val();			
      			if( email_field != confirm_email_field ) {
      				return false;
      			}
      			return true;
      		});
      	});
      		
      })(jQuery);
      </script>
      
      <?php endif; ?>
      
  50. Ketan December 6, 2015

    Hi Saravana Kumar K,

    i am using your plugin WC Field Factory. It’ very useful for me to display custom field in woocommerce single product page.

    Right now i am add two different “WC Product Field Groups” for single product.
    But right now i am facing on issues. this both WC Product Field Groups display same class name ““.

    My first group name is: Standard Stitching Size
    My Second group name is : Measurement unit

    I am set variation product. so if user can select “Standard Stitched Size” option in my variation then i want to show
    “My first group name is: Standard Stitching Size” field group field.

    And if user can select “Custom Stitching” option in my variation then i want to show “My Second group name is : Measurement unit ” field group field.

    So my question is that How can i add different class name “” for different WC Filed group in your plugin. So in this different class name i can apply java script and show and this my two groups as per my requirements.

    My Product URL: http://www.ethnicduniya.com/product/fnf0153/

    where i want to set this my requirements.

    Please replay me. i am waiting your replay.

    Thanks,
    Ketan.

  51. Isaac November 12, 2015

    Hi, do you have an updated timeline for when you’ll support editing the custom fields in the cart? I’m thinking about trying to add this functionality myself, but if you are planning to support it soon, I can wait. Happy to pay you for the functionality if/when it arrives. Thanks!

    1. Saravana Kumar K November 19, 2015

      Hi, WC Fields Factory V1.2.2 has been released with Fields Cloning ( Fields per quantity ) option and much more. and right now I am working on custom fields editing option for cart page. will release it soon.

      1. Lidia September 2, 2017

        Hi, I am trying to edit the fields in shopping cart, but the class wcff_get_referance_data is not found in wccpf-front-end.js line 24, I attach a screenshot.

        https://www.dropbox.com/s/3hn0nq2enw9c2fu/e814f.jpg?dl=0

        So var prodId, line 25 is undefined.
        After that nothing works properly because the code doesn’t know what product you are editing.

        Can you help me, please?

  52. SuccessDoc July 23, 2015

    Thank you for this great plugin! Just what I needed.

    But as a newbie non-techie, I have no clue as to how to use the code you provide in this documentation. I would like the fields styled in the fonts and coloring of my theme (see the page link provided). Is there a simpler way to accomplish this? If not, it would be wonderful to include this capability in a future update.

    Thanks!

    1. Saravana Kumar K July 24, 2015

      Hi, put the following css classes in your style.css, and customize it according to your design.

      body.woocommerce table.wccpf_fields_table { }
      body.woocommerce table.wccpf_fields_table td { }
      body.woocommerce table.wccpf_fields_table td.wccpf_label { }
      body.woocommerce table.wccpf_fields_table td.wccpf_value { }
      body.woocommerce table.wccpf_fields_table td.wccpf_label label { }
      body.woocommerce table.wccpf_fields_table td.wccpf_value input[type=text],
      body.woocommerce table.wccpf_fields_table td.wccpf_value input[type=email],
      body.woocommerce table.wccpf_fields_table td.wccpf_value input[type=number],
      body.woocommerce table.wccpf_fields_table td.wccpf_value select { }
      
  53. Darshan July 22, 2015

    Hi Sarvana, Just installed this plugin and works great..

    My question is what if customer wants to edit the choices after product added to cart, is there anyway I hook in function to show edit button on cart page so if customer makes mistake in entering text in let’s say text area field can go back to product and change it, so it updates the order accordingly??

    1. Saravana Kumar K July 22, 2015

      Hi Darshan,

      No you can’t update, If you go back to product page, and update those custom fields, it would be added as a new line item.

        1. Saravana Kumar K July 22, 2015

          yes, there are few hooks ( which would trigger on cart update ). needs bit of work, will update you soon.

          1. Darshan July 22, 2015

            Sure Sravan. couldn’t get my head around for hours .. I really appreciate it!! 😀

          2. Austen August 6, 2015

            Hi there – is there any chance of the custom fields being editable when the customer wants to alter his item in the basket? Thanks!

            1. Saravana Kumar K August 6, 2015

              Yes, it is possible, at this moment WC Fields Factory won’t support it. I am planning to add it to the plugin. I can’t promise anything about releasing time though.

          3. Gus September 22, 2017

            Hey there, I’m also looking for a way to edit the custom fields after adding the product to cart. The same way variations work. Have you ever looked into it since? Thanks!

  54. Mike July 20, 2015

    I am not a programmer but I do know html. I would like to know where i can find the code u mentioned in this post

    /* Fields Label */
    /* Actual Field */

    I want to remove the border and change the text vertical alignment. Thanks!

    1. Saravana Kumar K July 21, 2015

      Mike,

      That depends on which field your looking to change. Just go to WP-PLUGINS/wc-fields-factory/classes/fields/ there you will find all fields, for eg if you wanted to change the text fields, you can find it here WP-PLUGINS/wc-fields-factory/classes/fields/text.php

      But don’t do your changes there, do it in your functions.php using those hooks I have mentioned in this post

      1. Mike July 21, 2015

        Hey, sorry dont understand the example you gave. Is there a way you can show me an example of how I would take the code you showed and remove the table border.

  55. Michael July 9, 2015

    Just a quick note to say thank you for providing such a great plugin. Not only does it meet my needs but the little touches you’ve included like these before and after handlers is just outstanding 🙂

    1. Saravana Kumar K July 9, 2015

      Michael, You are welcome.!

  56. Katherine June 5, 2015

    Hi, great plugin!
    i’m using a grouped product to sell items, and i’d like the custom field to show below each product in the group – so all products can be bought from one page, but a customer is required to enter a detail (in this case a name) to buy each product. is this possible? am i missing something?
    thanks 🙂

    1. Saravana Kumar K June 5, 2015

      Hi thank you,

      You wanted to display custom fields to each individual product on a grouped product page right?. Using WC Fields Factory you can’t, but you can do it manually, you can find more details here, also show some example grouped product page so that I can point you which hook you can use.

  57. ondast June 4, 2015

    First of all thanks for the great plugin. Is there a way to show custom fields in the product listing/archive page also?

    1. Saravana Kumar K June 4, 2015

      Hi, not possible through WC Fields Factory, but you can do manually though. refer this article

      1. ondast June 4, 2015

        Okay, I will take a look at that. Thanks a bunch 🙂

  58. Vince May 20, 2015

    I’ve been looking for this for a while and finally found WC Fields Factory. Thank you so much for the plugin. It worked wonderfully with woocommerce English version. However, when I try to other language, the Field Label does not render utf-8 characters. Would you help and show me how to make it work. Thank you

    1. Saravana Kumar K June 3, 2015

      Hi vince, thanks for raising this issue, It’s been fixed, try the latest version – 1.1.4.

  59. Pingback: WC Fields Factory - a wordpress plugin to add custom fields to woocommerce product page - Sarkware