Support » Plugin: WC Fields Factory » Not show fields if empty

  • Resolved GetResults Digital

    (@webbieworks)


    Is there anyway to not show fields if the data is not filled in? Example, I have Model, Serial, Color. If only Model and Serial have the info, how do I get the Color not to show on the frontend?

Viewing 1 replies (of 1 total)
  • Plugin Contributor sarkparanjothi

    (@sarkparanjothi)

    Hi @webbieworks,

    i guess you are using admin field.
    `<script>
    var $ = jQuery;
    $(document).ready(function(){
    var wcff_fields = $( “.wccpf-field” );

    for( var i = 0; i < wcff_fields.length; i++ ){
    if( $( wcff_fields[i] ).val().trim() == “” ){
    $( wcff_fields[i] .closest( “.wccpf_fields_table” ).remove()
    }
    }

    });
    <script>`

    add this line into your theme fooder.php

    If you have any other doubt plase let me know.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Not show fields if empty’ is closed to new replies.