1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

disable submit button

Discussion in 'Community' started by jmoises, Nov 28, 2019.

  1. jmoises

    jmoises Member

    Level: Community
    Hello i am trying to disable the submit button depending the value of a element,

    i have found pices of js in the forum but many are not updated.

    i found this and works if use it on a element in JS but i cant figure out how to validate depending of alement
    Code (Text):
      jQuery('#fabrikSubmit_26').attr('disabled',true);
    so i try to add this in the element myelement in the JS area but no luck
    Code (Text):
    var els = Fabrik.blocks['form_26'].formElements;
    var bp = els.get('mytable___myelement').get('value');
    if (bp == 'NOVALID') {
      jQuery('#fabrikSubmit_26').attr('disabled',true);
    }else{
      jQuery('#fabrikSubmit_26').attr('enabled',true);
    }
    thanks for any addvise
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    It's built in: you can enable "Ajax validation" and "Toggle submit" in Form processing.
     
    jmoises likes this.
  3. jmoises

    jmoises Member

    Level: Community
    Ooo thank you
     
  4. jmoises

    jmoises Member

    Level: Community

Share This Page