• Resolved dominiccox

    (@dominiccox)


    I have a form that uses conditional fields, and most of these work fine, however a large part of my form is text fields with increment buttons (ie. -□+ ) with the box being 0,1,2 etc. The increment buttons work via javascript.

    I have one conditional field (‘Carpet Size’ on the attached URL) that is set to appear when the number of carpets ≠ 0, however, the field only appears when I click inside the text field, not when it is increased using the buttons. Is there a way to force the plugin to recognise the new value that is generated when clicking on a button, not just when clicking the text field itself?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    Seems like the buttons are not triggering a change event on the actual input fields. I would recommend you to contact the theme or plugin author about this, but you could probably work around it with this code:

    jQuery( document ).ready(function() {
      jQuery('.calc-button').on('click', function() { 
        jQuery(this).siblings('input').trigger('change')
      });
    });

    This is not ideal towards performance, so if you experience problems with this, definitely contact the author of the calc buttons theme or plugin.

    Thread Starter dominiccox

    (@dominiccox)

    That worked perfectly, many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conditional Field not appearing from increment buttons’ is closed to new replies.