Page 1 of 1

Conditionally preventing an item from being saved or edited.

Posted: Sun Jul 22, 2012 2:47 pm
by danielf
As per the title really.

I want to conditionally prevent a user from editing a field. It's much like the 'avoid blanks' or duplicates option, except it needs to be a custom condition. If the condition is met, and the user attempts to save a record, I want to bring up a dialogue box that informs the user he needs to amend another field before he can save this record, and prevent the current record being saved. Is there an easy way of doing this?

Thanks,

Dan.

Re: Conditionally preventing an item from being saved or edi

Posted: Mon Jul 23, 2012 6:02 am
by admin
Dan,

You can create a function called nuBeforeSave().

http://wiki.nubuilder.com/tiki-index.ph ... eforeSave_

Steven

Re: Conditionally preventing an item from being saved or edi

Posted: Mon Jul 23, 2012 9:33 pm
by danielf
Thank you Steven, that does exactly what I want.

Dan.

Re: Conditionally preventing an item from being saved or edi

Posted: Mon Jul 23, 2012 9:36 pm
by admin
Great!