Custom save action for object with password attribute
I have the following problem: I have an object that requires the use of custom save and cancel buttons. In this action I check if a password field is valid with a regex check. When I save the first time everthing goes ok, because than I fill my password and the check will succeed. However when I re-open the object and save again, I do not want to enter my password again. This because I do not wish to alter my password. I am trying to find a solution where I can use only one form. So not a different NEW and EDIT form. I also want to be sure that the first time a object is created, the password will be filled. I hope this is clear and that someone has a possible solution.
Marco de Kievit
I suggest you make an exclusive split with isNew($object) to check if you are doing a New or and Edit action. From here you can process it as desired.
I don't think you can show/hide the password field based on this though, as conditional formatting is based on an enum. Seems a bit much to create a virtual attribute enum for isNew only to show the password field. If you really want this I'd think you are better off with 2 separate forms.