Toggle read-only
Posted: 24 Jun 2015
I have a form with a People Picker field called Participants, on the Edit Form I would like to keep this field read-only because I have People Picker configured to show Picture and Name, and having the person's picture is important to the process.
This all works fine when i set People Picker to read-only in properties, but I would also like the user to be able to open the People Picker field to add people if desired, and I would like to do this with a button, so when you click the button if the field is read-only = true it will switch to read-only= False and vice versa.
Following the example of how to dynamically disable / enable fields , I have been going through the iterations putting code OnClick like
If fd.field('Participants').readonly(true){
fd.field('Participants').readonly(false);
} else {
fd.field('Participants').readonly(true);
}
No matter what I do, i cannot get the field to toggle back and forth from read-only TRUE / FALSE.
Is this not possible?
This all works fine when i set People Picker to read-only in properties, but I would also like the user to be able to open the People Picker field to add people if desired, and I would like to do this with a button, so when you click the button if the field is read-only = true it will switch to read-only= False and vice versa.
Following the example of how to dynamically disable / enable fields , I have been going through the iterations putting code OnClick like
If fd.field('Participants').readonly(true){
fd.field('Participants').readonly(false);
} else {
fd.field('Participants').readonly(true);
}
No matter what I do, i cannot get the field to toggle back and forth from read-only TRUE / FALSE.
Is this not possible?