Title: Fields
Last modified: February 3, 2021

---

# Fields

 *  [Nick Tolakis](https://wordpress.org/support/users/ntolakis/)
 * (@ntolakis)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/fields-16/)
 * Greetings there,
 * I have 4 fields in my product page.
    3 fields where the user inputs a code 1 
   field where the user inputs a name
 * For the ‘code’ fields since I need to get em visible based on item quantity for
   e.g if quantity is 1 Code field #1 and Name Field would be visible for input,
   if quantity is 2 Code field #1 & #2 & Name Field would be vissible and finaly
   if quantity is 3 Code field #1 & #2 & #3 & Name Field would be visible
 * I tweaked that by using some jquery and all is working fine with the visibility
   of the fields depending the quantity.
 * Though I would like to achive something more.
 * I need that every field which gets vissible based on user’s quantity option to
   be required. I’ve noticed that if I set all the fields required through plugin’s
   settings when I try to put something on cart I need to complete every field in
   order to continue to the order.
 * With some inspecting I found that every input has a data attribute wccpf-mandatory’,‘
   yes’ or no based on if the field is required or not. So with some jquery again
   I changed that value to yes when each field gets visible but if I leave one input
   empty I don’t get any notice that I need to complete the 2nd field for e.g and
   the order passes
    to the cart .
 * Do you know any workaround I could do in order to achive that?.

The topic ‘Fields’ is closed to new replies.

 * ![](https://ps.w.org/wc-fields-factory/assets/icon-128x128.jpg?rev=2738843)
 * [WC Fields Factory](https://wordpress.org/plugins/wc-fields-factory/)
 * [Support Threads](https://wordpress.org/support/plugin/wc-fields-factory/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-fields-factory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-fields-factory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-fields-factory/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Nick Tolakis](https://wordpress.org/support/users/ntolakis/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/fields-16/)
 * Status: not resolved