When the user selects the home address field, the office address should be automatically disabled. On the other hand, when the user selects the office address field, the home address should be automatically disabled. How do I do it using Pega?
I need a Disable a particular input field. How do I do it using Pega?
359 views Asked by Kasun98 At
1

I can suggest two solutions
Hide Home Address and Office Address layouts by default.
Add one Radio button at top of the address layouts for example Address Type with values Office and Address. If user selects Office address type from radio button then display Office Address Layout. If user selects Home address type from the radio button then display Home address layout.
Instead of hiding layouts, you can disable the fields as well based on the selected radio button option.
Add Action set on click on the Office Address layout and Home Address layout.
On click of Home Address layout add
On Clickaction. AddSet Valueaction and set a flag property as.HomeAddressSelected = true,.OfficeAddressSelected = falseand addPost Value action afterSet Valueaction. AddRefresh Sectionaction ifPost Valueaction is not working.On click of Office Address layout add
On Clickaction. AddSet Valueaction and set a flag property as.HomeAddressSelected = false,.OfficeAddressSelected = trueand addPost Valueaction afterSet Valueaction. AddRefresh Sectionaction ifPost Valueaction is not working.Now add disable condition for each property under Home Address layout as if
.HomeAddressSelected == falsedisable the field. and add disable condition for each property under Office Address layout as if.OfficeAddressSelected == falsedisable the field.Try both of the solutions and see yourself which one is business users accepting.