In UI, for a submit button, if a confirmMessage text is set along with a validat

In UI, for a submit button, if a confirmMessage text is set along with a validationGroup, is there a way to handle the confirmMessage ONLY if the validation group is validated?
Now the confirmMessage pops up along with the validation errors if in case of any. Can we control the order? anyone please?

OriginalPostID-166312

OriginalPostID-166312

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    Hi Smrutis,
    Please check below code snippet for confirmMessage, which checks the validations first and displays button's confirmMessage once all configured validations are satisfied. Here <<validationGroup>> must be same for the actual button and components to check.
    confirmMessage: if(and(a!buttonWidgetSubmit(validationGroup:<<validationGroup>>).@attributes.@anyAttribute.validationGroups=<<validationGroup>>,<<Validation condtitions configured for the each component used in the form with same validationGroup>>),"",<<Your confirmaMessage>>)

    This workaround might not be recommended but it works for your case. Please find attached sample SAIL form which is working fine with this work around.

    Sample.txt

Reply
  • 0
    Certified Senior Developer
    Hi Smrutis,
    Please check below code snippet for confirmMessage, which checks the validations first and displays button's confirmMessage once all configured validations are satisfied. Here <<validationGroup>> must be same for the actual button and components to check.
    confirmMessage: if(and(a!buttonWidgetSubmit(validationGroup:<<validationGroup>>).@attributes.@anyAttribute.validationGroups=<<validationGroup>>,<<Validation condtitions configured for the each component used in the form with same validationGroup>>),"",<<Your confirmaMessage>>)

    This workaround might not be recommended but it works for your case. Please find attached sample SAIL form which is working fine with this work around.

    Sample.txt

Children
No Data