Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Creating simple admin module help


Go to End


715 Views

Avatar
Kenson

Community Member, 2 Posts

1 March 2013 at 2:54pm

Dear All,

Good day to you. I am just started learning SS about 1 month ago and trying to build a simple admin site module for learning purpose.
I am using SS v3.0.5 with CMS. My module layout is look like this:

Marker has relationship with Sub Markers

Below is my problem would like solve it:
1. On submit validation and display error message below the field box
- my current validation is look like this:

Targeted to achieve:

2. Stop deletion action and redirect page to main and display error message if validation not pass (onBeforeDelete function)
This action activated when Marker still has child in Sub Markers. So when I delete the Marker I will check whether there is child in Sub Markers. If yes, then delete method will stop and the page redirect to main and display error message.

For more detail please view script attached.

Appreciate if someone can help me on above problem. Thank you very much. : )

Attached Files