Question
Cognizant
US
Last activity: 12 Feb 2020 8:33 EST
Disable FA submit button until user enters all the required fields
Requirement for an application on customer service for financial services framework on 8.1:
Until user enters all the required fields, the submit button should remain disabled.
There are multiple assignments with this requirement and they usually have about 10 required fields.
Approaches followed:
1.Disable the FA buttons, build customize buttons for each screen-however this approach doesn’t support reusability
2.Tried to write a java script that picks mandatory fields in current screen - the HTML code for the required fields used a Pega’s custom attribute called “validation type =required”-Couldn’t proceed with this.
3.set a display flag on FA submit button (enabled disable condition on client)..on each required field set and action set - on change -post value, run DT. The DT Checks if all the required fields have value in the particular assignment .if yes, set display flag to true. This works but when user clears the required field value the submit button doesn’t get disabled.
Conclusion:
None of these approaches worked for us. Please advice if we missed out any other way.
***Edited by Moderator: Lochan to update platform capability tags***