This topic is locked

How to Limit record adding on list page

4/12/2011 11:22:20 AM
PHPRunner General questions
T
text author

Hi
I know how to limit the number of records added from an add page but would like to be able to do it from the list page.
i.e. so when you click on "add new" if the maximum of records added is reached a message is displayed and you are not directed to the add page.
I don't think this is covered by one of the events is it?

Sergey Kornilov admin 4/12/2011

The best approach is to replace 'Add new' button with your own button (use 'Insert button' option). In this button server side code you can check the number of records already created and either redirect user to the Add page or display a message staying on the List page.