Same UI action button needs to be clicked twice and should perform different action on each click

poojavaishnav
Tera Contributor

Hi all,

I have a requirement that is when user click on a button, it should make the field mandatory. On filling some text in that field if user clicks again on the button, it should make the field read only and keep the filled text in the field. 

I have created a UI action and client script(on submit) for this, so on clicking the button for the first time, the field is set to mandatory when user clicks the button again, it is loading the form but not making the field read only and text also getting removed.

Can please anyone help with the solution ?

Below I shared the screenshots of CS and UI action :

cs.PNGMicrosoftTeams-image (1).pngMicrosoftTeams-image.png

0 REPLIES 0