Posted: 1 Feb 2020 10:12 EST 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.
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.
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***
Thanks for your inputs, I see a scenario where we may have an issue:
Say we have a required field FirstName.
User enters the required field value . On change it calls the DT to set the integer property.
Now, User clears the value in First name, since its a required field there is validation that shows up and still the clipboard hold the First Name value, it doesn't clear the value. as a result the submit button will remain enabled.
Posted: 1 year ago
Posted: 10 Feb 2020 1:51 EST
Bala Nagendra Babu Devaguptapu (Bala_Nagendra)
Principal Technical Solutions Engineer