• Resolved myerrorsandmysolutions

    (@myerrorsandmysolutions)


    Hi,

    I have a calculated field that has been set as Hidden but still visible on the page. Am I doing something wrong or is this a bug?

    The calculated field on my page is “Coefficente”

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor hugreed

    (@hugreed)

    Hi, yes, this is a bug, we will add a fix in the next release.

    For now, you can add this piece of code to your functions.php

    add_filter( 'jet-form-builder/render/calculated-field', function ( $field_args, $render_instance ) {
    	if ( ! empty( $field_args['calc_hidden'] ) ) {
    		$render_instance->add_attribute( 'class', 'jet-form-builder__calculated-field--hidden' );
    	}
    
    	return $field_args;
    }, 10, 2 );

    Thanks for assistance!

    Thread Starter myerrorsandmysolutions

    (@myerrorsandmysolutions)

    Apparently, the Hidden setting in the calculate field block does not apply any changes to the field, compared code of two fields (one set to Hidden and one No) and same code.

    A workaround is to write “hide” in the CSS Class Name delegating bootstrap to hide this and emptying the label.

    Thread Starter myerrorsandmysolutions

    (@myerrorsandmysolutions)

    Applied the code as suggested and it works.

    Thank you

    Thread Starter myerrorsandmysolutions

    (@myerrorsandmysolutions)

    Fixed in version 1.2.2

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Calculated field set to Hidden but still visible’ is closed to new replies.